1,174 Posted Topics

Member Avatar for lostangel556

[QUOTE=lostangel556;1098059] However it still seems to have an issue if i want to do the below. [CODE]CONST INT iCommPortCount = 5; HANDLE comports[iCommPortCount]; comports[0] = CreateFile("\\\\.\\COM6", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL); comports[1] = CreateFile("\\\\.\\COM7", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL); comports[2] = CreateFile("\\\\.\\COM8", GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL,NULL); comports[3] = CreateFile("\\\\.\\COM9", …

Member Avatar for nezachem
0
205
Member Avatar for tkud

[QUOTE=tkud;1087145]OK, the code compiled and my tmCharSet ids ANSI_CHARSET. What do I do next ,please.Thank you for your time,frederick, and I'm sorry for my mistakes.[/QUOTE] Since you are obviously compiling with UNICODE #defined, call the ANSI-version of SetWindowText excplicitly when setting the EDIT control's text (naturally do that only when …

Member Avatar for Frederick2
0
920
Member Avatar for rsaska

[QUOTE=Ancient Dragon;1084887]The return code from system() is pretty much useless -- all it indicates is whether system() successfully ran the command or not. It says nothing about the program that system() ran. [/QUOTE] That's not quite so. Basically system() returns the value from the command interpreter i.e. it can well …

Member Avatar for mitrmkar
0
202
Member Avatar for DarthPJB

[QUOTE=DarthPJB;1082927]I beg to differ, in my copy of the ansi C spec section 2.2.4.2 - Numerical limits: <snip> am I reading it backwards and it means something else? [/QUOTE] I think you are not understanding the [COLOR="Red"]following[/COLOR] Sizes of integral types The values given below shall be replaced by constant …

Member Avatar for DarthPJB
0
109
Member Avatar for edgar5

If you need to resolve the path and file name of a .lnk file (i.e. a shortcut) that's dropped on the Audacity project, you'll need to use the IShellLink interface. Read about [URL="http://msdn.microsoft.com/en-us/library/bb776891(VS.85).aspx"]Shell Links[/URL] in MSDN. [QUOTE=edgar5;1076989] This is (fairly) new behaviour to Windows (might be in Vista) and I …

Member Avatar for mitrmkar
0
219
Member Avatar for Jennifer84

You have to check against [ICODE]std::string::npos[/ICODE] the return value of the find() method. [code] std::string::size_type pos = string1.find("*"); if(std::string::npos != pos) { // found a match at 'pos' } else { // not found } [/code] For information on std::string::npos see [url]http://www.cplusplus.com/reference/string/string/npos.html[/url]

Member Avatar for dpreznik
0
146
Member Avatar for phillipeharris

The ending backslash works as a continuation character, turning the following line into a comment too.

Member Avatar for brian4092004
0
125
Member Avatar for Glasgow

You might download SysInternal's [URL="http://technet.microsoft.com/fi-fi/sysinternals/bb896653(en-us).aspx"]Process Explorer[/URL] and use its [I]Find handle or DLL[/I] utility to see which process has that .nrg file open.

Member Avatar for kaninelupus
0
271
Member Avatar for sommanatt

see getrusage(), e.g. here [url]http://linux.die.net/man/2/getrusage[/url]

Member Avatar for myle
0
3K
Member Avatar for Klapiii

[QUOTE=Klapiii;836907]Refresh.[/QUOTE] I doubt that anyone here will take up the task of modifying the program. A slight chance of getting some sort of assistance might be to contact the author, his contact information is available on the program's Help/About window.

Member Avatar for Ancient Dragon
0
263
Member Avatar for delifion

About converting the seed, you'd be better of using stringstream (atoi() is a poor choice for that). Below is a snippet for the conversion ... [code] #include <sstream> #include <iostream> using namespace std; int main(int argc, char * argv[]) { // only two arguments accepted, check ... if(argc != 2) …

Member Avatar for Gerlan
0
488
Member Avatar for Mostafa Adel

That is not quite correct, see [COLOR="Red"]comments[/COLOR] [CODE] int main(void) { /* Declare the '2D Array' */ char ** ptr = new char * [5]; ptr[0] = new char[20]; ptr[1] = new char[20]; ptr[2] = new char[20]; ptr[3] = new char[20]; ptr[4] = new char[20]; /* Put some data in …

Member Avatar for MosaicFuneral
0
214
Member Avatar for Duki

I think the two friend declarations need [ICODE]template <class T>[/ICODE] [code] template <class T> class Tree { ... [COLOR="Green"]template <class T>[/COLOR] friend void buildExprTree(Tree<T> & expr); [COLOR="Green"]template <class T> [/COLOR]friend int eval(Tree<T> & expr); ... }; [/code]

Member Avatar for Duki
0
409
Member Avatar for metal_butterfly

Maybe [URL="http://beej.us/guide/bgnet/output/html/multipage/index.html"]Beej's Guide to Network Programming[/URL]

Member Avatar for jephthah
0
92
Member Avatar for Dewey1040

There is an initialization failure ... [code] for( i = 0; i < n; i++ ) numberlist[i] [COLOR="Red"]=[/COLOR]= rand() % n ; [/code]

Member Avatar for Dewey1040
0
201
Member Avatar for danielle23

[QUOTE=danielle23;835284]Or maybe I'm missing something now in the switch statements that can still allow me to use them...[/QUOTE] Yes, you are missing semicolons ... [code] void bird :: double travel_time (double distance, terrain_type t) { switch (t) { case PLAIN: travel_time = ((distance/landspeed)*1) [COLOR="Red"];[/COLOR] break; case HILL: travel_time = ((distance/landspeed)*2) …

Member Avatar for danielle23
0
237
Member Avatar for pandey

[QUOTE=daviddoria;835841]There seem to be random *'s all over the code...[/QUOTE] Yes, those *'s have been there for quite some time ...;)

Member Avatar for Ancient Dragon
0
119
Member Avatar for opposition

[QUOTE=daviddoria;835116]For example, this does not compile: [code] class Point { private: //friend class PointFriend; double x,y,z; public: Point(const double xin, const double yin, const double zin) : x(xin), y(yin), z(zin) {} }; class PointFriend { private: friend class Point; public: PointFriend() { Point P(1.2, 2.3, 3.4); cout << P.x << …

Member Avatar for daviddoria
0
172
Member Avatar for bocabomb85

Looking at your previous post, there's an orphan [ICODE]if[/ICODE] there ... [code] break; case '#': [COLOR="Red"]if[/COLOR] break; default: [/code]

Member Avatar for mitrmkar
0
224
Member Avatar for TheFueley

[QUOTE=TheFueley;834539]"cannot convert from const Node *const to Node* Conversion loses qualifiers". I'm not sure how to fix this. [/QUOTE] You can use const_cast, i.e. [code] Node * temp = const_cast<Node*>(this); [/code] Maybe you could revise the 'constness' of the code (I did not look too closely). Perhaps read about [URL="http://www.parashift.com/c++-faq-lite/const-correctness.html"]Const …

Member Avatar for TheFueley
0
184
Member Avatar for ItecKid

Think of [ICODE]bar->second[/ICODE] as a [ICODE]map <string, int>[/ICODE], so simply ... [code] bar->second["abc"] = 123; [/code]

Member Avatar for ItecKid
0
2K
Member Avatar for tomtetlaw
Member Avatar for kuru225

Problem is that [ICODE]x[/ICODE] is not initialized to zero (I take that you simply want to swap the values). You might have it a bit simpler like ... [code] if (numB < numA) { // use x only inside the if-block int x = numA; numA = numB; numB = …

Member Avatar for kuru225
0
169
Member Avatar for ganmo

Pass the vector[COLOR="Green"] by reference [/COLOR]just like you already pass the Demo object. [CODE] istream& operator>> (std::istream& in, vector<double> [COLOR="Green"]&[/COLOR] d); std::istream& operator>> (std::istream& in, vector<double> [COLOR="Green"]& [/COLOR]d) [/CODE] Maybe read about [URL="http://www.parashift.com/c++-faq-lite/references.html"]References[/URL]

Member Avatar for ganmo
0
169
Member Avatar for jimjohnson123

As long as you have an internet connection, you can always check online, whether or not your code compiles. Below are couple links: [URL="http://www.comeaucomputing.com/tryitout/"]Comeau[/URL] and [URL="http://www.dinkumware.com/exam/default.aspx"]DINKUMWARE[/URL]

Member Avatar for nucleon
0
151
Member Avatar for joejoe55

[QUOTE=joejoe55;829337]I dont know how to read a number value..[/QUOTE] See [URL="http://msdn.microsoft.com/en-us/library/ms724345(VS.85).aspx"]GetPrivateProfileInt Function[/URL]

Member Avatar for mitrmkar
0
1K
Member Avatar for eviocg

[QUOTE=marco93;828334]Never use system() on Win32 Use Win32 api (TP and others)[/QUOTE] What on earth "TP and others" means?

Member Avatar for mitrmkar
0
118
Member Avatar for toadzky

[QUOTE=toadzky;827634]yes. it's just a cpp file (probably could be .h) that holds some enums. [COLOR="Red"]no actual code in it or includes[/COLOR][/QUOTE] There is a contradiction, in your first post you say that "Each file has: #include "include.h"". If enum.cpp actually includes include.h, that results in the error you described. [EDIT] …

Member Avatar for toadzky
0
193
Member Avatar for Icebone1000

[QUOTE=Icebone1000;826166] using this : [CODE]writer.write(reinterpret_cast<char*>(&img_pix[i].rgb) ,sizeof(img_pix[i].rgb));[/CODE] the file gets 10,7 MB o__o" using this : [CODE]writer.write(reinterpret_cast<char*>(&img_pix[i].rgb[0]) ,sizeof(img_pix[i].rgb[0]));[/CODE] the file gets 3,4 MB .. using this: [CODE]writer.write(&img_pix[i].rgbb[0],sizeof(img_pix[i].rgbb[0]));[/CODE] the file gets 914KB using this: [CODE]writer.write(reinterpret_cast<char*>(&img_pix[i].rgbb) ,sizeof(img_pix[i].rgbb));[/CODE] the file gets 2,67 MB using this: [CODE]writer.write(reinterpret_cast<char*>(&img_pix[i].rgbb[0]) ,sizeof(img_pix[i].rgbb[0]));[/CODE] the file gets 914 KB[/QUOTE] It seems …

Member Avatar for nucleon
0
208
Member Avatar for lllllIllIlllI

With MSVC 6.0, the latest Windows SDK that can be used is the [URL="http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm"]Windows Server 2003 Platform SDK[/URL] Either switch to that old SDK or get e.g. a VS Express edition, which works with your current SDK.

Member Avatar for lllllIllIlllI
0
278
Member Avatar for odonal01

Learn how to use [URL="http://www.daniweb.com/forums/announcement8-3.html"]code tags[/URL], without code tags, your code is pretty much unreadable. If you expect to be helped, shouldn't you ask a question?

Member Avatar for VernonDozier
0
152
Member Avatar for dubster

[ICODE]void createAlpha(char **[COLOR="Red"]&[/COLOR]data, int elements);[/ICODE] Sorry, but [COLOR="Red"]that[/COLOR] is strictly a C++ feature, not C.

Member Avatar for tux4life
0
106
Member Avatar for GadiK

[QUOTE=GadiK;819736] What I would like is that when write text in the first edit box and hit ENTER the dialog would push the first button that I created. [/QUOTE] That functionality can be achieved by simply making sure that: [LIST] [*]the first button (only) has the 'default button' -option checked …

Member Avatar for GadiK
0
829
Member Avatar for etc123

[QUOTE=etc123;823959]Assuming that the warnings are ok and they are arising out of so many different files, is there a way to supress them in the Makefile so that they dont pop up?[/QUOTE] Consult the compiler documentation.

Member Avatar for mitrmkar
0
444
Member Avatar for cwarn23

[QUOTE=Freaky_Chris;823605] Unmanaged Win32 Code, is directly interfacing with the win32 API. [COLOR="Red"]Managed Win32 is using the MFC[/COLOR]. Which is what MVC++ users tend to do. Thus you do not need the catorgarized link that he sent you, but you need the MFC, since this will probably easier for you. The …

Member Avatar for mitrmkar
0
143
Member Avatar for Evan M

Read about [URL="http://www.parashift.com/c++-faq-lite/virtual-functions.html#faq-20.7"]When should my destructor be virtual?[/URL]

Member Avatar for Evan M
0
175
Member Avatar for NicAx64

[QUOTE=NicAx64;821306]...ask this type of question in a public [COLOR="Red"]greek lounge[/COLOR].[/QUOTE] Err, this is "Geeks' Lounge" not "Greek Lounge". Maybe you'd like to submit your post at [URL="http://www.greeklounge.tv/"]Greek Lounge[/URL] ;)

Member Avatar for MosaicFuneral
0
289
Member Avatar for wrxhokie

[QUOTE=wrxhokie;821589]Unfortunately, there is only one occurrence of the prototype, and thats in the header of the static library. I'm really at a loss at this point...[/QUOTE] You might try posting on the MSDN's [URL="http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/threads/"]Visual C++ General[/URL] forum.

Member Avatar for Ancient Dragon
0
202
Member Avatar for riahc3

[QUOTE=riahc3;821340]Hey In VS, you can in a struct do: [code] struct test{ int tes; }tt; [/code] then when I put tt., it would display the all fields in a tooltip which in this case would display tes. Is "IntelliSense" (I know it is not called that) in wxDev-C++?[/QUOTE] It's called …

Member Avatar for mitrmkar
0
121
Member Avatar for DemonGal711

[QUOTE=DemonGal711;820731]I'm dealing with a map of vectors, and I'm making sure I clean up all the memory used. So, what exactly is the best way to handle this? [/QUOTE] As soon as the map goes out of scope, its destructor takes care of destructing all the vectors, whose destructors in …

Member Avatar for DemonGal711
0
90
Member Avatar for daviddoria

[QUOTE=daviddoria;820831]If I use the uncommented 3 lines for getting an int out of a stringstream, the value in MPV is wrong. However, if I make a new stringstream, then it works fine. I thought setting .str("") was essentially resetting the stringstream? [/QUOTE] If the stream object is in error state, …

Member Avatar for daviddoria
0
469
Member Avatar for wrxhokie

Read about [URL="http://msdn.microsoft.com/en-us/library/deaxefa7(VS.71).aspx"]Name Decoration[/URL]. You need to learn how to use [ICODE]extern "C"[/ICODE].

Member Avatar for wrxhokie
0
325
Member Avatar for freddan007

[QUOTE=freddan007;820016]I still get an error: [CODE] Main.cpp In function `BOOL DlgProc(HWND__*, UINT, WPARAM, LPARAM)': Main.cpp `InitCommonControlsEx' undeclared (first use this function) (Each undeclared identifier is reported only once for each function it appears in.) Makefile.win [Build Error] [Main.o] Error 1 [/CODE] [/QUOTE] In your project, [ICODE]#define _WIN32_IE[/ICODE] to at least …

Member Avatar for freddan007
0
763
Member Avatar for bluemm87

A typo has slipped in ... it should be [ICODE]localVar[COLOR="Red"]i[/COLOR]able[/ICODE].

Member Avatar for bluemm87
0
76
Member Avatar for risa

[QUOTE=risa;819696]How can i prevent a dialog closing by Alt+F4 ? I am using PreTranslateMessage()[/QUOTE] Instead of PreTranslateMessage(), add a handler for [URL="http://msdn.microsoft.com/en-us/library/ms646360(VS.85).aspx"]WM_SYSCOMMAND[/URL] and detect SC_CLOSE.

Member Avatar for mitrmkar
0
249
Member Avatar for joejoe55

CommonStructs.h needs to be #included before Vars.h is included. I.e. [code] #include ... #include "CommonStructs.h" #include "Vars.h" #include ... [/code] As of now, the order of inclusion is wrong. In future, when you post a project, please Clean it before zipping, so that all the unnecessary binaries (*.obj etc) get …

Member Avatar for mitrmkar
0
192
Member Avatar for freddan007

[QUOTE=freddan007;818482]Is it possible to get the return value of a function started with the CreateThread function or is the only way I can get a value from it to use global variables? I searched but i found nothing. Thanks.[/QUOTE] See [URL="http://msdn.microsoft.com/en-us/library/ms683190(VS.85).aspx"]GetExitCodeThread()[/URL]

Member Avatar for freddan007
0
525
Member Avatar for Necrolis

[QUOTE=Necrolis;812450] any cryptic clues or help is much appreciated :)[/QUOTE] One approach would be to [LIST] generate a default MFC-based add-in [/LIST] [LIST] study it so that you understand how things work [/LIST] [LIST] strip off all MFC/AFX -based stuff, converting the add-in to a standard DLL (i.e. with a …

Member Avatar for Necrolis
0
166
Member Avatar for MK12

[QUOTE=MK12;817170]py2exe don't require the user to install python.. somehow but I can't figure out how to use those. [/QUOTE] Try going through the [URL="http://www.py2exe.org/index.cgi/Tutorial"]py2exe tutorial[/URL]. [QUOTE]EDIT: Actually I guess the exe file could just be a function that does the command "python foo.py" and it could find the other file …

Member Avatar for MK12
0
172
Member Avatar for VBNick

Don't allocate using the operator new, use _aligned_malloc() instead to have the data properly aligned.

Member Avatar for VBNick
0
232

The End.