Please help....trying to learn C++

Sep 29, 2014 at 8:31pm
I am getting an internal and external error when I compile this program that I am trying to get to work.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
  // This program will let the user input a letter from the screen.  The program will then
// use that letter and give the translation of the inputted letter to the ROT13 letter on
// the screen. 
#include <cmath>
#include <ismanip>
#include <iostream>
using namespace std;
int main ()
// Input variables
{
char letter;
cout << “Please enter a letter” << endl;
cin >> letter;
// Figuring the ROT13 Letter
if (letter == 'A')
	cout << “The letter you entered is”<< “ “ << letter<< endl;
	cout << The ROT13 letter translation is “<< “ “ << “N”<< endl;
else if (letter == 'B')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “O” << endl;
else if (letter == 'C')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “P” << endl;
else if (letter == 'D')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “Q” << endl;
else if (letter == 'E')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “R” << endl;
else if (letter == 'F')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “S” << endl;
else if (letter == 'G')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “T” << endl;
else if (letter == 'H')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “U” << endl;
else if (letter == 'I')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “V” << endl;
else if (letter == 'J')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “W” << endl;
else if (letter == 'K')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “X” << endl;
else if (letter == 'L')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “Y” << endl;
else if (letter == 'M')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “Z” << endl;
else if (letter == 'N')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “A” << endl;
else if (letter == 'O')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “B” << endl;
else if (letter == 'P')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “C” << endl;
else if (letter == 'Q')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “D” << endl;
else if (letter == 'R')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “E” << endl;
else if (letter == 'S')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “F” << endl;
else if (letter == 'T')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “G” << endl;
else if (letter == 'U')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “H” << endl;
else if (letter == 'V')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “I” << endl;
else if (letter == 'W')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “J” << endl;
else if (letter == 'X')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “K” << endl;
else if (letter == 'Y')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “L” << endl;
else if (letter == 'Z')
	cout << “The letter you entered is” << “ “ << letter << endl;
	cout << The ROT13 letter translation is “ << “ “ << “M” << endl;
}
return 0;
Last edited on Sep 29, 2014 at 8:32pm
Sep 29, 2014 at 9:05pm
Should be #include iomanip , not ismanip.
Sep 29, 2014 at 9:06pm
All of our telepath are currently on vacation, please stand by intil someone will guess your error.

Seriously, post the error you are getting.

What can be seen from your snippet, is strange quotes: these: are not these: ". They are different and compiler would not threat former as proper quotes.
Sep 29, 2014 at 9:16pm
"is not recognized as an internal or external command, operable program or batch file"
Sep 29, 2014 at 9:17pm
And the first part which you omitted? There should be filename. It looks like either messed project settings or incorrect toolchain configuration.
Sep 29, 2014 at 9:25pm
C:\Users\David\document\visual studio 2013\Projects\Lab 5.2\Debug\Lab 5.2.exe
Sep 29, 2014 at 9:30pm
Sep 29, 2014 at 9:37pm
The problem is probably that the project file/path has spaces.
If you' re able to, place doublequotes around the entire filepath.
Also the project has errors and as already said will not compile.
Last edited on Sep 29, 2014 at 9:39pm
Sep 29, 2014 at 9:39pm
now it will compile, but with 202 errors and 3 warnings....WOW!
Sep 29, 2014 at 9:43pm
Does that errors reference to the quotes symbols?
Sep 29, 2014 at 9:54pm
"using" is unidentified
Sep 29, 2014 at 10:12pm
Now, just 102 errors and no warnings.
Sep 29, 2014 at 11:06pm
you are missing the first " everywhere!

cout << The ROT13 letter translation is “ << “ “ << “M” << endl;
Last edited on Sep 29, 2014 at 11:08pm
Sep 29, 2014 at 11:10pm
before copying a code to paste, make sure you have no syntax or other errors in what you are about to paste plenty of times.
Sep 30, 2014 at 12:05am
You are freaking crazy using all those if statements...
Sep 30, 2014 at 6:11am
closed account (48T7M4Gy)
You are freaking crazy using all those if statements...


1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>

int main()
{
    char input, ROT = 13;
    while (true)
    {
        std::cin >> input;
        input = 65 + (input - 65 + ROT) % 26;
        std::cout << "  -" << input << std::endl;
    }

    return 0;
}
Sep 30, 2014 at 6:41am
closed account (48T7M4Gy)
The character being used for quotation marks is not the usual ". It is some other keystroke - whatever it is, it is the wrong one.
Sep 30, 2014 at 7:42am
didnt you just notice? about missing double quote?
Sep 30, 2014 at 8:29am
closed account (48T7M4Gy)
didnt you just notice? about missing double quote?

lol
Topic archived. No new replies allowed.