Hi, I'v recently started self learning C++ but I'm already struggling.
I'm presuming it's something stupid I'm doing. The error I keep getting is "1>loops.cpp(8): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int". I was reluctant to post this as such a new member and have tried the search function to no success so I'm sorry if I missed something blatant. Anyway, any help would be greatly appreciated.
Code:// loops.cpp : main project file. #include "stdafx.h" #include "iostream" using namespace std; main() { int loop; int first = 1; int second = 0; int answer; cout << "-Fibonchi system-/n"; cout << "Please enter how many numbers you would like in the fibonchi system/n"; cin >> loop; cout << "1 "; while(loop>>1) { answer = first + second; cout << answer <<" "; loop = loop - 1; second = first; first = answer; } cout << endl; system("pause"); return 0; }