Hello, I'm in the process of programming a software renderer. Up to scanline rasterizing now and it's getting fairly complex. Anyway I've been getting some very strange errors from a particular class in my project. The vertex class has been working 100% fine until now including it in other classes etc. I recently had to add 4 extra methods to the vertex class to get and set private members Normal and a Color. I started getting this error that I was getting previously. Its driving me nutty. The worse thing is when I removed the changes I'd made using undo I was still getting the same error after it was previously working, I've once, twice and triple checked the class to see if anything is out of sorts. Bare in mind their is about 12 classes in the project and I'm not having this issue with any others. Basically whenever I change something in vertex class it doesnt like it. Currently its this Constructor in the vector3d class thats giving me the most errors.
I'm getting the errors:
Error 10 error C4430: missing type specifier - int assumed. Note: C++ does not support default-int h:\year 2\5cc068 introduction to 3d graphics programming\week 3\week3gdiplus1\vector3d.h 11
and
Error 11 error C2143: syntax error : missing ',' before '&' h:\year 2\5cc068 introduction to 3d graphics programming\week 3\week3gdiplus1\vector3d.h 11
Specifically in the Vector3D class.
It feels like their is some connection between these 2 classes and these errors yet they were none existent with the identical code, until I added (and then removed) methods in the vertex class.
hi,i think the code u posted doesn't seem to have anything to do with the errors,wich by the way are not strange...
what's strange with a ',' missing before a parameter?
also Error 10 error C4430: missing type specifier - int assumed
means u're using a variable like x=124 instead of double x=124; or int x=124 and that the compiler is assuming it's an int.
i hope that helps.
I don't think you read my post correctly, these errors come and go as they choose with no changes to the code, I'm using visual studio 10 btw. The errors I specified above are coming specificly from line 11 of that code above, underneath the copy constructor, I'm also getting a problem where in some places where I'm passing a vertex as a parameter and Vertex.h is included as normal it's telling me vertex is undefined then when I double click the error to move to where the error is located it opens the class where its used as a parameter and the error no longer registers and sometimes it compiles normally like this and sometimes the error pops up. Yea so like I said ... strange, I'm fairly sure I'm not retarded enough to declare any variable without a type. lol.
sorry...i didn't mean to offend u,and declaring variables without a type is something that happens to me
from time to time,and i like to think i'm not retarded.anyway...i'm sorry i have no idea about the source of
your problem.but i still think that nothing is wrong with the code you posted...maybe you should also post
vertex.h?