Click here to Skip to main content
11,928,605 members (55,932 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked

static variables causing problem in console applications

, 20 Mar 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
sometimes console applications give runtime error when you declare static varialbes, so here is a solution how to deal with it


Have you ever faced the problem of declaring static variables in a console application causing a crash or memory error?

Then here is..

The Solution

Just declare mainCRTStartup as the entry point for you exe.  You can do it in the Linker->Advance Tab if you are using Visual Studio 2005


Mr. Saiful Alam (Enosis Solutions) for the R&D and solution


Tip uploaded : 20th March, 2012


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Mukit, Ataul
Chief Technology Officer Rational Technologies
Bangladesh Bangladesh
Your Lord does not like people who waste by extravagance, and only the righteous C s, and does so in increments, and they are of those people who are mindful of what memory and time has in offer and they waste none of it.

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.151126.1 | Last Updated 20 Mar 2012
Article Copyright 2012 by Mukit, Ataul
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid