So I'm trying to learn C++ from this book and it uses an example:
#include <iostream>
using namespace std;
int main()
{
int num = 100;
char letter = 'M';
float decimal = 7.5;
double pi = 3.14159;
bool flag = false;
cout << "num:\t" << num << end1;
cout << "letter\t" << letter << end1;
cout << "decimal:" << decimal << end1;
cout << "precise:" << pi << end1;
cout << "flag\t" << flag << end1;
return 0;
}
now when I try to compile this I get errors;
C:\Documents and Settings\Administrator\Desktop\variables.cpp In function `int main()':
Line 12 C:\Documents and Settings\Administrator\Desktop\variables.cpp `end1' undeclared (first use this function)
I am using Bloodshed Dev-C++
Can anyone help me out?
The outcome is supposed to look like this;
num: 100
letter M
decimal:7.5
precise:3.14159
flag 0
#include <iostream>
using namespace std;
int main()
{
int num = 100;
char letter = 'M';
float decimal = 7.5;
double pi = 3.14159;
bool flag = false;
cout << "num:\t" << num << end1;
cout << "letter\t" << letter << end1;
cout << "decimal:" << decimal << end1;
cout << "precise:" << pi << end1;
cout << "flag\t" << flag << end1;
return 0;
}
now when I try to compile this I get errors;
C:\Documents and Settings\Administrator\Desktop\variables.cpp In function `int main()':
Line 12 C:\Documents and Settings\Administrator\Desktop\variables.cpp `end1' undeclared (first use this function)
I am using Bloodshed Dev-C++
Can anyone help me out?
The outcome is supposed to look like this;
num: 100
letter M
decimal:7.5
precise:3.14159
flag 0

