Click here to Skip to main content
15,114,414 members
Articles / Programming Languages / C++
Tip/Trick
Posted 19 Mar 2012

Tagged as

Stats

6.4K views
2 bookmarked

static variables causing problem in console applications

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
20 Mar 2012CPOL
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
Technical Lead Kotha Technologies
Bangladesh Bangladesh
If you are not in - you are out !
- Chapter 1

Comments and Discussions

 
-- There are no messages in this forum --