+ 2

Separating classes in files

I'm using C4droid with g++ bionic compiler on android 4.2.2. The example of seperating classes in files in C++ Tutorial, Ch6: More on classes, lesson3:selection operator , doesn't work in my IDE, it says tht the object doesn't have member named myfunc().Please can anyone help me?!

27th Jan 2017, 2:51 AM
Abdullah Omar Nasseef
Abdullah Omar Nasseef - avatar
1 Odpowiedź
0
Not sure exactly but you need to tell the compiler all the files you want to use. For example if your main is in `main.cpp` and your other file is `otherFile.cpp`. `main.cpp` is probably including `otherFile.cpp` so compile like this `g++ main.cpp otherFile.cpp -o outputBin` Hope that helps
31st Jan 2017, 7:04 AM
Jeff Gregory
Jeff Gregory - avatar