now, the (refined and optimized) code works on my laptop but on the PC i get this ****ty
'cout' : undeclared identifier
'cin' : undeclared identifier
i dont have the source code from the laptop but im fairly certain its correct.
// crap.cpp : main project file.
#include <iostream>
#include <stdafx.h>
using namespace System;
int main()
{
int num, num2;
//ZOMG LOOP!
num = 1;
cout << "Enter a number bitch!";
cin >> num2;
while (num <= num2)
cout << "Fail " num;
num++;
return 0;
}
i know about the braces needed for the loop, and the for loops and how that can further optimize.
Do not correct the code! as i am just learning, i want to figure out the syntax/logic errors myself and will learn nothing if done for me.
i just want this cout error crap fixed.
(using visual C++ 2005)
'cout' : undeclared identifier
'cin' : undeclared identifier
i dont have the source code from the laptop but im fairly certain its correct.
// crap.cpp : main project file.
#include <iostream>
#include <stdafx.h>
using namespace System;
int main()
{
int num, num2;
//ZOMG LOOP!
num = 1;
cout << "Enter a number bitch!";
cin >> num2;
while (num <= num2)
cout << "Fail " num;
num++;
return 0;
}
i know about the braces needed for the loop, and the for loops and how that can further optimize.
Do not correct the code! as i am just learning, i want to figure out the syntax/logic errors myself and will learn nothing if done for me.
i just want this cout error crap fixed.
(using visual C++ 2005)