Jump to content

Check out our Community Blogs

Ancient Dragon

Member Since 29 Jan 2008
Offline Last Active Apr 29 2012 06:13 AM

#620751 visual c++ ODBC query

Posted by Ancient Dragon on 29 January 2012 - 01:37 PM

Oh, I see what's wrong. You need to turn off pre-compiled headers. To do that, select Projects --> Properties --> Configuration Properties --> c++ --> Precompiled Headers --> then select "Not using precompiled headers" in the combo box. You can do this easier when you create the project -- at one point it has a checkbox to turn off precompiled headers.

Attached Thumbnails

  • Untitled.png

  • -1

#615353 Windows 8

Posted by Ancient Dragon on 27 November 2011 - 04:24 AM

Current win32 api will still be supported. If it weren't then no current windows program could run under windows 8.
  • -1

#611984 How to fix warning deprecated conversion from string constant to 'char*' in C++?

Posted by Ancient Dragon on 21 October 2011 - 06:13 PM

Just a question, what WOULD happen if you passed it to a function that tried to change it?

The program would most likely crash because string literals are normally stored in read-only memory.
  • 1

#586914 C++, using Forms v.s GUI Toolkit.

Posted by Ancient Dragon on 09 January 2011 - 11:35 AM

>>does CLR/C++ take away some of the power of C++?
Depends on what you mean by that. CLR/C++ requires .NET framework, so if the target computer doesn't have it then the program won't run. AFAIK all versions of MS-Windows since Vista has it installed. In many ways CLR/C++ is better than c++ because lots of things are simply easier to do with the .NET framework. You still have all the streams and STL containers you are familiar with in c++. I don't know if there is a boost port or not.

>>And if I use a cross compiler and GUI kit, my program will be runnable on any OS right

Not the same binary -- you have to compile the source code for each target os you want to support. If you want to support MS-Windows, *nix and MAC then you will have to get a copy of QT for each of those operating systems and compile your program with each one. There are such things as cross compiler, where the compiler can produce binaries for multiple operating systems, but AFAIK QT is not one of them.
  • 1

#582053 Simple string problem

Posted by Ancient Dragon on 28 November 2010 - 11:50 AM

Better still is not to use gets() at all because its dangerous and could cause write beyond the end of the input buffer. Replace gets() with fgets() where you can control the number of characters it will put into the input buffer.
fgets(name, sizeof(name));

  • -1

#578157 Inline Functions

Posted by Ancient Dragon on 27 October 2010 - 07:12 AM

>>Is there a way to make a non-inline function inline for a single call?

No -- it's either inline or it isn't. Note that __inline is only a hint to the compiler -- the compiler is free to ignore it if it wishes.
  • -1

#557161 A quick vector question! :D

Posted by Ancient Dragon on 29 May 2010 - 07:17 AM

Read this thread
  • -1

#557047 C++ Bruteforce

Posted by Ancient Dragon on 28 May 2010 - 04:17 AM

I found at least one code example in about 10 seconds. See this google link
  • -1

#554199 GUI Programming

Posted by Ancient Dragon on 30 April 2010 - 05:58 PM

Microsoft has several "walkthroughs" -- which are a set of short tutorials. Here is the list, so scroll near the end of the list and you will see the ones titled Windows Forms Walkthroughs
  • -1

#552465 Communicating with external devices?

Posted by Ancient Dragon on 19 April 2010 - 06:01 PM

Skydiving??? Why in the world would anyone want to jump out of a perfectly good operating airplane? I don't mind heights -- as long as I can keep both feet on the ground.
  • -1

#549672 Looking for a FindFirstFile() FindNextFile() Example...

Posted by Ancient Dragon on 29 March 2010 - 04:00 PM

See this code snippet

From the code you posted it looks as if you are compiling for UNICODE. cout can not handle wchar_t strings. Use wcout. The path passed to FindFirstFile() is wrong. You have to pass both the path and filename, such as "c:\\*.*". If you check the return value for what you wrote you will find that that function returned INVALID_HANDLE_VALUE.
  • 1

#549428 difference between wstrcmp and wcscmp??

Posted by Ancient Dragon on 28 March 2010 - 12:13 PM

wstrcmp() <==== could be an switch to apple mac kind of thing yus???

Could be -- I have no idea because I don't program for that os.
  • -1

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download