How Can I convert my arduino code to C/C++ embedded code
Arduinos use a standard C++ compiler. The supposed "Arduino Language" doesn't exist; it is C++. Except that the Arduino IDE will permit you some shortcuts that the compiler doesn't. The two biggies are:


The IDE will notice that your are trying to use libraries (ones it recognizes, anyway) and insert the necessary #include &lt;SOMELIBRARY.H&gt;, if you didn't do it.
The IDE will notice when you make forward reference to a function not yet defined nor declared, and provide the necessary forward declaration.


But if you manage these for yourself, as you would have to in any other C++ environment, your code structure will be portable. 

The remaining source of incompatibility is hardware dependence. Writing embedded systems software is almost always hardware dependent. It has to be dependent on the external hardware, and quite likely is dependent on specifics of the MCU. The latter dependencies can usually be written around. Function calls or direct references to the processor's I/O registers, for example, which, on another processor, will map differently, maybe even to memory addresses instead of to registers at all.

Another processor will very likely have an entirely different set of pins with different characteristics and capabilities from the original one. Libraries to drive external hardware will likely have been designed for a given processor or processor-family and may not map gracefully to another.

If processor independence is a design-goal of the project, then you'd probably define a hypothetical set of features that you'd expect all processors to share, and hand code for anything outside of that basic set. If you wanted to take advantage of certain features if they were available on a given processors, then, in addition to the hand-coded features you wish to have, you'd also provide conditionally compiled, optimized-for-the-processor code that you could enable when you compile for that processor, and disable for all others.