开发者

Unresolved externals error during compilation

开发者 https://www.devze.com 2023-02-11 02:43 出处:网络
I am getting two unresolved externals error while trying to compile the following c++ program in Visual Studio 2010-

I am getting two unresolved externals error while trying to compile the following c++ program in Visual Studio 2010- http://codepad.org/5ZS4gtfP

I tried cross checking everything but cant开发者_开发知识库 seem to find the problem. Can someone plz compile it in VS 2010 and try to find out the solution?


For a start, conio.h is not standard C or C++ - it tends to be found in code written for the Turbo C/C++ products, a particular favourite of Indian universities.

And they invariably use it just so they can call getch when there's a perfectly adequate getchar in the standard :-)

As to the index variable, it's probably already defined in one of the headers.


  • Line 18: error: conio.h: No such file or directory:

Try to include <conio.h> instead of "conio.h".

  • Line 25: error: 'unsigned int index' redeclared as different kind of symbol:

It could be that one of the headers you're including already declares index. Try to rename it to see the difference - or better yet don't use a global variable at all.

0

精彩评论

暂无评论...
验证码 换一张
取 消