and when i tried to fix some of those errors, it gave me more errors, i dunno.. please help me sir
That's not uncommon in code with errors, 1 error hides another one so you don't get the compile error for the second error until you have fixed the first.
Fixing errors is an iterative process,
- Compile code
- If there are no errors or warnings stop
- Fix some or all of the errors and warnings
- goto 1
Concentrate on these 3 warnings and errors to start with
-
1>Compiling...
-
1>sequence9.cxx
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cxx(34) : warning C4267: 'initializing' : conversion from 'size_t' to 'const int', possible loss of data
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cxx(35) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cxx(35) : error C2146: syntax error : missing ';' before identifier 'current_index'
-
The first 2 are warnings because the type of member variable used is size_t but you are assign it to an int. The type of size_t is platform dependent but I guess it may be unsigned long on your platform (or long if you have 16 bit ints).
The third message, the error message is an actual mistake in you code, look at the line it references and see if you can spot any errors in it, you are missing an operator.
These errors are probably just by products of the error you just fixed
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(35) : error C2146: syntax error : missing ')' before identifier 'i'
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(35) : error C2059: syntax error : ';'
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(35) : error C2059: syntax error : ')'
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(36) : error C2143: syntax error : missing ';' before '{'
-
This is the next real error
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(44) : error C2146: syntax error : missing ';' before identifier 'Edit'
-
Go to the line(44) of code see if you can see something wrong with the syntax
This error then produces these by products
-
1>c:\users\mrahil\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(44) : error C2146: syntax error : missing ';' before identifier 'Options'
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(44) : error C2146: syntax error : missing ';' before identifier 'Buffers'
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(44) : error C2146: syntax error : missing ';' before identifier 'Tools'
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(44) : error C2146: syntax error : missing ';' before identifier 'C'
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(44) : error C2143: syntax error : missing ';' before '++'
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(46) : error C2143: syntax error : missing ';' before '{'
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(46) : error C2447: '{' : missing function header (old-style formal list?)
-
Once you have fixed 3 - 5 errors it isprobably time to compile again and see what you get
The final three warnings
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(63) : warning C4267: 'initializing' : conversion from 'size_t' to 'const int', possible loss of data
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(64) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
-
-
1>c:\users\anan\documents\visual studio 2005\projects\assignment2\assignment2\sequence9.cx x(64) : warning C4018: '<' : signed/unsigned mismatch
-
1>Build log was saved at "file://c:\Users\Anan\Documents\Visual Studio 2005\Projects\Assignment2\Assignment2\Debug\BuildL og.htm"
-
1>Assignment2 - 19 error(s), 5 warning(s)
are merely warning of your mix use of non-matching integer types. (i.e. assign a 32 bit int to a 16 bit int or comparing a sign and an unsigned integer)