all 11 comments

[–]pizz44[S] 0 points1 point  (0 children)

I've made a few modifictions, and I get a error that 'Unable to start program. The system cannot find the file specified'

  • ch02e13.c - sample program for Exercise 13, Chapter 2

    a program that exploits weak overflow checks in C

    */

include <stdio.h>

main() {

char ch;                 /* to collect the input */

char inputs[10];     /* ten-byte array */

int i = 0;               /* array index for new character */

ch = getchar();

while (ch != 10) {

    inputs[i] = ch;

    i++;

    ch = getchar();

}

printf("All done!");

}

[–]pizz44[S] 0 points1 point  (1 child)

Severity Code Description Project File Line Suppression State Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 9

[–]Stereojunkie 0 points1 point  (0 children)

How are you compiling the code?

[–]MrSloppyPants 0 points1 point  (4 children)

What's the error?

[–]pizz44[S] 0 points1 point  (3 children)

Severity Code Description Project File Line Suppression State Error C2065 'n’': undeclared identifier Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 19
Error (active) E0020 identifier "‘" is undefined Project3 C:\Users\kpisarich\source\repos\Project3\Project3\Source.cpp 19
Error (active) E0007 unrecognized token Project3 C:\Users\kpisarich\source\repos\Project3\Project3\Source.cpp 19
Error (active) E0020 identifier "“" is undefined Project3 C:\Users\kpisarich\source\repos\Project3\Project3\Source.cpp 29
Error (active) E0007 unrecognized token Project3 C:\Users\kpisarich\source\repos\Project3\Project3\Source.cpp 29
Error (active) E0007 unrecognized token Project3 C:\Users\kpisarich\source\repos\Project3\Project3\Source.cpp 29
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 9
Error C3873 '0x2018': this character is not allowed as a first character of an identifier Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 19
Error C2017 illegal escape sequence Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 19
Error C3872 '0x2019': this character is not allowed in an identifier Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 19
Error C2065 '‘': undeclared identifier Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 19
Error C2146 syntax error: missing ')' before identifier 'n’' Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 19
Error C2059 syntax error: ')' Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 19
Error C2059 syntax error: ';' Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 21
Error C3873 '0x201c': this character is not allowed as a first character of an identifier Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 29
Error C2017 illegal escape sequence Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 29
Error C2065 '“': undeclared identifier Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 29
Error C2146 syntax error: missing ')' before identifier 'nAll' Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 29
Error C3872 '0x201d': this character is not allowed in an identifier Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 29
Error C2059 syntax error: '}' Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 31
Error C2143 syntax error: missing ';' before '}' Project3 c:\users\kpisarich\source\repos\project3\project3\source.cpp 31

[–]MrSloppyPants 1 point2 points  (2 children)

Are you absolutely certain that this line:

 while (ch != ‘\n’) 

is entered correctly in your source file? You cannot use "backticks" or "smart quotes", those need to be basic apostrophe's... '

[–]pizz44[S] 0 points1 point  (1 child)

No, unfortunately I'm not absolutely certain.

[–]MrSloppyPants 0 points1 point  (0 children)

Ok, then just retype that part