打不开文件Cannot open include file: 'stdafx.h': No such file or directory如何处理
代码如下:
#include "stdafx.h"
#include <iostream>
#include <list>
#include "MyString.h"
using namespace std;
#pragma warning(disable:4786)
int main (void)
{
list<CMyString> Milkshakes;
list<CMyString>::iterator MilkshakeIterator;
Milkshakes.push_back("Chocolate");
Milkshakes.push_back("Strawberry");
Milkshakes.push_front("Lime");
Milkshakes.push_front("Vanilla");
// print the milkshakes
Milkshakes.push_front("The Milkshake Menu");
Milkshakes.push_back("*** Thats the end ***");
for (MilkshakeIterator=Milkshakes.begin();
MilkshakeIterator!=Milkshakes.end();
++MilkshakeIterator)
{
// dereference the iterator to get the element
cout << (const char *)*MilkshakeIterator << endl;
}
return 0;
}
提示错误:Cannot open include file: 'stdafx.h': No such file or directory
另外:#pragma warning(disable:4786)是什么意思?