Here is the skeleton of my code in file.cpp
Expand|Select|Wrap|Line Numbers
- #include<iostream>
- class someclass{
- public:
- somevariable *sm;
- };
- someclass *sm[4];
- void somemethod();
- int someanothermethod(somevariable *me);
- int main()
- {
- somemethod();
- some code which calls someanothermethod()..
- return 0;
- }
g++ file1.cpp smthing.o file2.cpp
After I do that...it gives me error that
error:‘someanothermethod’ was not declared in this scope
error: ‘me’ was not declared in this scope
Whats going wrong here? Further I dont want to deal with new header files.
Any help would be appreciated.
Thanks in advance.