Click here to Skip to main content
Click here to Skip to main content

Tagged as

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

Introduction

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

Acknowledgements

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

History

Tip uploaded : 20th March, 2012

License

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

Share

About the Author

Mukit, Ataul
Chief Technology Officer Rational Technologies
Bangladesh Bangladesh
C++ is not C with classes, JQuery is not Javascript, Google Search is not Learning, Design Patterns are not fashion, A code written in 2005 is not backdated just because it's 2015
Follow on   Twitter

Comments and Discussions

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