Hi Plokij, there are many online and downloadable converters from python to c++.You can use for example Cython to convert to C (then its very easy to convert it to c++ by yourself) or Shed skin to convert from python to c++.There are many many more..
Good luck
I'm not too familiar with Cython, but this is for a class and I want to learn how to do it manually. Not sure if Cython will allow me to do that..I will definitely look into it..
But for now, can anyone look at my C code and tell me where I went wrong?
"undefined reference to 'std::string::size() const'"
"undefined reference to 'std::string::operator[](unsigned int) const'"
"undefined reference to 'std::ios_base::Init::Init()'"
and a few more that look similar to those...never seen those types of errors before...and I'm using gcc..
Errors I can find:
Line 13: You should check if (argc > 1) before trying to use any argv[]
Line 27: You return in the middle of a loop. Return should be outside the loop.
Line 12: Define n = 1, in case no value is supplied through argv.
Line 12: No need for variable i; Unused
If this is pure C, then there is no iostream or usingnamespace std;
Perfect! I've removed iostream and namespace and moved the "return f" out of the while loop, and now it works.. thank you everyone..=)
just wondering, though...why wasn't it working for me when i had the iostream and namespace in there? is it because i called from both the c library and c++ library? (i'm not sure if that even make sense, i'm quite a noob still...)