No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
16 Posted Topics
Re: Specify the BS_ICON style when creating the button. Also handy is to check return values from functions like LoadImage to ensure a valid icon handle is returned. | |
Re: It's an mfc file (ms compilers standard edition or better are required). The simplest workaround is to just replace it with #include <windows.h>. Alternatively, if you're using mingw then you can #include <afxres.h> (which just #includes windows.h and defines IDC_STATIC). If you're using msvc-express with the platform/windows sdk then you'll … | |
Re: Don't call WM_PAINT handlers directly - use InvalidatRect to add the specified rectangle to the update region for the next paint cycle; if you need to force the paint then you can follow the InvalidateRect with an UpdateWindow, or just cut to the quick with RedrawWindow. But InvalidateRect is usually … | |
Re: Using [url=http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1049157810&id=1043284351]gets[/url] is a very bad idea; use [url=http://www.cppreference.com/stdio/fgets.html]fgets[/url] instead, both to read in the filename from stdin and to read the opened file a line at a time. If the length of a line read by fgets is one then it's a new line on its own (a paragraph … | |
Re: The issue arises because a window/dialog procedure is an alias(typedef) for a pointer to a function taking four parameters and returning a non-void 'value'. Your non-static member class function does not match this type(it's encumbered with [b]this[/b]), while a static function does. Obviously, you could also make the callback procedure … | |
Re: There's a recommendations thread at the top of this board: [url]http://www.daniweb.com/forums/thread70096.html[/url] But the best beginners book is [i]Accelerated C++[/i]. The best ide is whichever one you're most comfortable with. | |
Re: Use one of the glTranslate functions, for example: [code]glPushMatrix(); [b]glTranslatef(-10.0f, 0.0f, 0.0f)[/b]; glBegin( GL_LINES ); glVertex3f( 0.0f , 50.0f , 0.0f ); glVertex3f( 10.0f , 0.0f , 0.0f ); glEnd(); glPopMatrix();[/code] | |
Re: >this program runs perfectly I doubt that: main returns int. Remove <windows.h> as it's windows specific. The required libraries are glut, gl and glu, although you may not need all three with that code. I don't know about using netbeans for c++ so I can't advise you on how to … | |
Re: I think that [url=http://www.cppreference.com/stdstring/strtok.html]strtok[/url] may be what you're after; [url=http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1061423302&id=1044780608]here's an example of its use[/url] that you may find useful. | |
Re: >I am using Dev-C++ with gcc and g++. You need to #include <windows.h> in your resource script (digitron_rc.rc) to ensure that all resource definition statements are defined for the resource compiler. | |
Re: int main() is the correct entry point. >duplicate symbol _main in... You probably just need to clean your build (remove all those object files ie *.o - look for or create a 'clean' rule in your makefile if using one or a 'clean' option in whatever ide you're using) and … | |
Re: Alternatively, you should be able to statically link with the c-runtime library with the /MT switch but this is not recommended since any bugs in the crt will be hard-coded into your application. With the redistributables approach suggested by Ancient Dragon, the dll's on which your application is dependent can … | |
Re: >void main() main returns int. >i want to check that the string contains $GPGLL Use std::string::find. >knowing that each substrings ends with "," Use std::string::find_first_of. | |
Re: >For further info see ReadFile crashes by toolmanx. I'm sorry but I've no time nor inclination to go hunting for some previous post/thread of yours - could you please provide a link if you want to provide more context? >Also, why I couldn't use ReadFile as written in Win32.HLP bothers … | |
Re: >is Visual Studio a suitable tool for non-CLI applications? Yes. Just create an empty project and include the headers that you need. >What's up with the stdafx.h header? stdafx.h is ms specific and unnecessary for console applications. There are different ones which just include different headers or define various macros. … | |
Re: Single character definitions require apostrophes (single quotes) while char arrays (strings) need quotes, for example: [code]char single_char = 'a'; char stringy[] = "character array";[/code] |
The End.