Problem with Compiler

I've suddenly started having a problem where every program I try to compile says it has build errors, and I get the error message "error C4430: missing type specifier - int assumed. Note: C++ does not support default-int". This is even happening with programs that previously worked fine and have not been changed. Any idea what the issue is?
Thanks.
Could you post an example of a program that isn't working?
Sure- this is one that really stumps me, because it worked perfectly before and I've made no changes. It was for a class, and I got a perfect score on it. I assume the issue is with the compiler, not the code, because the exact same thing happens universally with every program I try to compile, even ones that I know for a fact should 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
#include <iostream>
using namespace std;

int main()
{
	int fullDays, totalHours;
	double remainder, costPerDay, costPerHour, remainderCost, costOfWholeDays, finalTotal;

	costPerDay = 200;
	costPerHour = 40;
	
	//Determining the remainder
	cout << "How many hours are required to install the floor?";
	cout << endl;
	cin >> totalHours;
	remainder = totalHours%8;

	//Determining the number of full days
	fullDays = (totalHours / 8);

	//Determining the total cost of the job
	costOfWholeDays = fullDays*costPerDay;
	remainderCost = remainder*costPerHour;
	finalTotal = costOfWholeDays + remainderCost;

	//Outputs
	cout << "The final total cost is " << finalTotal << " dollars.";
	cout << endl;
	cout << "There will be " << fullDays << " full days of work.";
	cout << endl;
	cout << "The last day will take " << remainder << " hours.";
	cout << endl;
		
	return 0;
}
Question: when you double click on the C4430 error, does it take you to a specific line of code? Or does it tell you what function is having trouble associating itself with your other files/functions?

If that's not the issue, then it might be you accidentally changed something when setting up a new project, like not making an empty project or something.

If that don't work, do it like Microsoft and uninstall/reinstall. Or turn it off and back on. By it, I mean your computer.
closed account (48T7M4Gy)
How many hours are required to install the floor?
90
The final total cost is 2280 dollars.
There will be 11 full days of work.
The last day will take 2 hours.


Works OK here. Something wrong in your Visual Studio by the sound of it. Probably time to upgrade to VS2015 given the following and YFGH's comment above

Compiler Warning C4430
Visual Studio 2015
https://msdn.microsoft.com/en-us/library/ms173696.aspx
I rebooted and it magically started working again. I guess I'll never know what it was. Thanks though.
Topic archived. No new replies allowed.