I am new to Visual c++ (having used c, java and VB, I thought the transition would be easy) and keep running into annoying errors. Here is the latest one.
I have created a class, FILESCHEMA and created an object in the main function
FILESCHEMA myfile(SEARCHPATH, true);
for use with testing. After manual testing, it appears it is working as planned so I tried to call it from another function. This time, however, it doesn't like its instantiation in that new function. When I put the line as is into the other function and compile, I get this error:
error C2146: syntax error : missing ';' before identifier 'myfile'
I have looked over the code and there does not appear to be any missing semicolons(also I commented out a few lines that are clearly syntactically correct so I know it isn't a rogue or missing ';') Then I tried using the new operator:
FILESCHEMA myfile = new FILESCHEMA (SEARCHPATH, true);
and got 103 errors(90 more than before) so that is going in the wrong direction. Anyone have any ideas?
I have created a class, FILESCHEMA and created an object in the main function
FILESCHEMA myfile(SEARCHPATH, true);
for use with testing. After manual testing, it appears it is working as planned so I tried to call it from another function. This time, however, it doesn't like its instantiation in that new function. When I put the line as is into the other function and compile, I get this error:
error C2146: syntax error : missing ';' before identifier 'myfile'
I have looked over the code and there does not appear to be any missing semicolons(also I commented out a few lines that are clearly syntactically correct so I know it isn't a rogue or missing ';') Then I tried using the new operator:
FILESCHEMA myfile = new FILESCHEMA (SEARCHPATH, true);
and got 103 errors(90 more than before) so that is going in the wrong direction. Anyone have any ideas?