C 2260 Error while compiling Triple X

I started out with a C 4244 error and eliminated it by adding new preprocessor directives as include<>. After this I got a C 2260 error. I believe that it is asking for more code. I have research this has to do with the rand function or srand function. Also with time_t which is part of the time() function and the difference between 32bit and 64bit processing of the compiler. Being new at this language and its’ capabilities I am not sure what direction I should take next. Can anyone help on this?







Hi
Are you viewing the correct file? Because the error points to Triple-X-4.cpp file and you are viewing Triple-X-5.cpp.

Triple-X-5A was a cloned from Triple-X-4 and is dependent on Triple-X-4 and complies out as Triple-X-4. I eliminated some of the print to screen or cout lines to get a better view of the program in Triple-X-5A. Without A5 I have a C 4244 error now I was using A5 to trouble shoot 4. Here is a screen shot of Triple-X-4 with the error code. ( Triple-X-5A will not run without Triple-X-4). I can send more screenshot of Triple-X-4 if you want to cut down on confusion. Presently remove and have Triple-X-5A stored on C drive.

How? They are two different projects.

That shows it successfully built and that is just a warning. srand takes an unsigned int but time returns time_t which is a typedef for some real numeric type (i.e. float. double, long double). To silence that warning you would need to cast it.

srand(static_cast<unsigned>(time(NULL)));

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.