Click here to Skip to main content
15,891,951 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to keep a running total in a text file? Pin
David Crow17-Nov-03 7:48
David Crow17-Nov-03 7:48 
AnswerRe: how to keep a running total in a text file? Pin
Peter Molnar18-Nov-03 15:26
Peter Molnar18-Nov-03 15:26 
GeneralDetecting dependent DLLs Pin
Arash Sabet17-Nov-03 6:24
Arash Sabet17-Nov-03 6:24 
GeneralRe: Detecting dependent DLLs Pin
igor196017-Nov-03 10:10
igor196017-Nov-03 10:10 
GeneralProblems building a general program using C++ .NET Pin
changuyen17-Nov-03 5:59
changuyen17-Nov-03 5:59 
GeneralRe: Problems building a general program using C++ .NET Pin
Toni7817-Nov-03 7:08
Toni7817-Nov-03 7:08 
GeneralRe: Problems building a general program using C++ .NET Pin
changuyen17-Nov-03 15:02
changuyen17-Nov-03 15:02 
GeneralRe: Problems building a general program using C++ .NET Pin
Michael Gunlock17-Nov-03 18:58
Michael Gunlock17-Nov-03 18:58 
This link error is occuring because your compiler/linker settings are expecting WinMain(...) as the entry function, not main(). This occurred when creating the project.

You can get the above code to compile by manually setting the compiler/linker settings:
- Make sure your "Solution Explorer is visible" ( View | Solution Explorer)
- Right click on project (**not the solution**) node in Solution Explorer tree view and select properties
- Click on C/C++ | Preprocessor. On the right hand side you will see "Preproccesor Definitions".
- Replace _WINDOWS with _CONSOLE (NOTE the underscore)
- Now, click on Linker | System. Click on the "Subsystem" on the right. Once the Subsystem line is active and drop down arrow appears to the far right. Click on that and you will see a list of choices. You want to change the "Windows (/SUBSYSTEM:WINDOWS)" to "Console (/SUBSYSTEM:CONSOLE)".
- Compile. Should work. Now "int main()" is the expected entry function.

The above can all be avoided by selecting a "Win32 Console Project" instead of a "Win32 Project" when you create a new project.

And by the way, I am assuming your iostream header was included and was clipped from your code above because the "< >" was treated as an HTML tag in the post.

Mike
GeneralRe: Problems building a general program using C++ .NET Pin
Anonymous18-Nov-03 23:32
Anonymous18-Nov-03 23:32 
QuestionCompiler for AMD 64? Pin
Robert Buldoc17-Nov-03 5:56
Robert Buldoc17-Nov-03 5:56 
AnswerRe: Compiler for AMD 64? Pin
Maxwell Chen17-Nov-03 17:44
Maxwell Chen17-Nov-03 17:44 
Questionopen files over the net???? Pin
IGeorgeI17-Nov-03 5:22
IGeorgeI17-Nov-03 5:22 
AnswerRe: open files over the net???? Pin
Peter Molnar17-Nov-03 15:02
Peter Molnar17-Nov-03 15:02 
GeneralRight Click on the header in Owner-drawn-fixed CListCtrl Pin
g_sol_117-Nov-03 5:20
g_sol_117-Nov-03 5:20 
GeneralRe: Right Click on the header in Owner-drawn-fixed CListCtrl Pin
Roger Allen17-Nov-03 5:43
Roger Allen17-Nov-03 5:43 
GeneralRe: Right Click on the header in Owner-drawn-fixed CListCtrl Pin
g_sol_117-Nov-03 19:48
g_sol_117-Nov-03 19:48 
GeneralUsing SerializeElements Pin
David Crow17-Nov-03 4:51
David Crow17-Nov-03 4:51 
GeneralLocalSystem Pin
hph17-Nov-03 4:44
hph17-Nov-03 4:44 
GeneralRetrieve computer names network Pin
Abebe17-Nov-03 4:14
Abebe17-Nov-03 4:14 
GeneralRe: Retrieve computer names network Pin
David Crow17-Nov-03 4:54
David Crow17-Nov-03 4:54 
GeneralRe: Retrieve computer names network Pin
Abebe17-Nov-03 21:16
Abebe17-Nov-03 21:16 
GeneralPDF 417 barcode reader/printer Pin
Kene17-Nov-03 4:11
Kene17-Nov-03 4:11 
GeneralRe: PDF 417 barcode reader/printer Pin
Roger Allen17-Nov-03 5:47
Roger Allen17-Nov-03 5:47 
GeneralRe: PDF 417 barcode reader/printer Pin
Kene17-Nov-03 21:51
Kene17-Nov-03 21:51 
GeneralNeed help with DataGrid Component Pin
bilas17-Nov-03 4:05
bilas17-Nov-03 4:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.