Absurd values to main(int argc, char** argv)

I had on old C++ project starting a Console-application. With a breakpoint in main(int argc, char** argv) started program.exe -debug. According to the debugger argc became 32 and the strings in argv had weird random-like values. When execution continued access violation occurred, since the strings in argv pointed to invalid values.

What can be causing this?


The linker had wrong Entry Point set. For a normal console application this should be mainCRTStartup (the debugger shows __tmainCRTStartup).

Having an invalid entry point caused main to look at what "happended" to be in the stack. Posting this since it was not trivial to find.

Need Your Help

Ideas on how to implement CMS for language specific page

database internationalization asp.net-mvc-4

I'm building a web shop and I'm implementing language selection as well as a CMS. I also have to provide an administrator of the site with the means to be able to edit a page through the CMS.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.