0

I am attempting to use a different template and write in C++/CLI. The debug file isn't being created for some reason. If I misspell a keyword or enter errors I don't see any red squiggly lines. When I attempt to compile I can't because of an error.

C1083: Cannot open precompiled header file: 'Debug\(filename).pch': No such file or directory

I'm using Visual Studio Pro 2010

#include "stdafx.h"

using namespace System;

enum class Months {January=1, February, March, April, May, June, July, August, Semptember, October, November, December};

int main(array<System::String ^> ^args)
{
	Months::month = Months::January;
	int value = safe_cast<int>(month);
	for(int x=1; x<13; x++){
		Console::WriteLine(L"The numerical value of {0} is {1}", month, value);
		month++;
	}
	
    return 0;
}
2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by MagnetoM
0

Did you already do a clean and build?
There are some options related to pchs (pre-compiled headers) in build options.
-- Uncheck them (do not use pchs), clean, build
-- Check them, clean, build

0

Thanks alot, it worked after I cleaned it which I never had to do for the other templates.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.