Up till today I haven't had any problems debugging and running my programs. I had a class assignment to make a program that would make a diamond out of *. I wrote the code, which I will paste at the end, but haven't been able to test it due to an error i am getting. The system cannot fine the file specified. I copy and pasted the code into new projects and had the same results. Any help is welcome.
Here is the debug sheet:
Command Lines
Creating temporary file "c:\Users\DavesM6400\Documents\Visual Studio 2005\Projects\test1\test1\Debug\RSP00000167166332.rsp" with contents
[
/Od /D "_MBCS" /Gm /EHsc /RTC1 /MDd /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W3 /c /Wp64 /ZI /TP ".\teste.cpp"
]
Creating command line "cl.exe @"c:\Users\DavesM6400\Documents\Visual Studio 2005\Projects\test1\test1\Debug\RSP00000167166332.rsp" /nologo /errorReport:prompt"
Output Window
Compiling...
teste.cpp
c:\users\davesm6400\documents\visual studio 2005\projects\test1\test1\teste.cpp(12) : warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
c:\program files\microsoft visual studio 8\vc\include\stdio.h(295) : see declaration of 'scanf'
c:\users\davesm6400\documents\visual studio 2005\projects\test1\test1\teste.cpp(14) : error C2059: syntax error : ';'
c:\users\davesm6400\documents\visual studio 2005\projects\test1\test1\teste.cpp(16) : error C2059: syntax error : ';'
c:\users\davesm6400\documents\visual studio 2005\projects\test1\test1\teste.cpp(18) : error C2059: syntax error : ';'
c:\users\davesm6400\documents\visual studio 2005\projects\test1\test1\teste.cpp(23) : error C2059: syntax error : ';'
Results
Build log was saved at "file://c:\Users\DavesM6400\Documents\Visual Studio 2005\Projects\test1\test1\Debug\BuildLog.htm"
test1 - 4 error(s), 1 warning(s)
and here is the code for the program:
#include <stdio.h>
#include <conio.h>
int main (void)
{
int inputnum;
int x;
int m;
int scounter;
printf ("Enter how many rows you would like:\n");
scanf ("%d", &inputnum);
for (m=0;m<2;m++;){
for (x=1;x<=inputnum;x++;){
if (m==0){
for (scounter =1; scounter<=inputnum-x;scounter++;)
printf (" ");
}
}
}
for (scounter=1;scounter<2*x;scounter++;){
printf ("*");
}
getch();
return 0;
}
#include <stdio.h>
#include <conio.h>
int main ()
{
int inputnum;
int x;
int m;
int scounter;
printf ("Enter how many rows you would like:\n");
scanf ("%d", &inputnum);
for (m=0; m<2; m++) //Leave out the last semi-colon as I did
{
for (x=1; x<=inputnum; x++) //Leave out the last semi-colon as I did
{
if (m==0)
{
for (scounter =1; scounter<=inputnum-x; scounter++) //Leave out the last semi-colon as I did
printf (" ");
}
}
}
for (scounter=1; scounter<2*x; scounter++) //Leave out the last semi-colon as I did
{
printf ("*");
}
getch();
return 0;
}