15,300 Posted Topics

Member Avatar for coolbeanbob

Use your compiler's debugger and single step through the program to find out what the problem is. You can also put print statements around the program so that you can see the value of various variables. line 65: for (int column = 0; column < 5; column++) Why 5? why …

Member Avatar for coolbeanbob
0
121
Member Avatar for Octet

The problem is line 8 of the header file. Delete that semicolon at the end of the class name. Otherwise it looks to be ok. >> it is generally inadvisable to have code (as opposed to declarations) in a header file He has inline code, which is perfectly acceptable and …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for zeroliken

You need to learn how to use your compiler's debugger so that you can single step through your program and find out for yourself what is causing the problem. That will save you lots and lots of time

Member Avatar for zeroliken
0
501
Member Avatar for peter20

Never declare data objects in a header file because if you include the same header file in multiple *.c or *.cpp files the compiler will generate multiple declaration errors. So you want to move lines 12 - 17 of that header file into the *.c file (about line 7).

Member Avatar for Narue
0
125
Member Avatar for fatzky_04

Where is your program? We are not going to write it for you. But as a hint: Save a copy of the initial node pointer so that as the program iterates through the nodes it knows where it started.

Member Avatar for Ancient Dragon
-2
85
Member Avatar for BabiesGame

>>Also on a side note what part of the memory is the realtime screen data stored Depends on what operating system you are talking about. MS-DOS Version 6.X and older was stored at address 0x8000:0000, and graphics memory at 0xA000:0000 (or something like that, I'm recalling from over 20 years …

Member Avatar for N1GHTS
0
1K
Member Avatar for tvm78

lines 37 and 43: the friend functions need to return a value. Your compiler probably gave you a warning on this and you just ignored it.

Member Avatar for Ancient Dragon
0
242
Member Avatar for BoBok2002
Member Avatar for sita12345

Lots of different causes, one being your program may have scribbled something all over memory and damaged vector's memory space. Another problem could be bad use of pointers. Without knowing more details about the program its not possible to give you any really good answers to your question. One way …

Member Avatar for sita12345
0
367
Member Avatar for astrolegacy

>>.can someone help me going with this coding? Yes, we can [b]help[/b], but we're not going to write it for you.

Member Avatar for astrolegacy
0
153
Member Avatar for vgd

Please post the entire code that will actually compile. That means adding all the parentheses, commas and semicolons, as well as the function.

Member Avatar for smilenow
0
148
Member Avatar for clorofaysal

class nopdeType is expecting an integer, not a data type. Example: [icode]nodeType *n = new nodeType(5);[/icode]

Member Avatar for Ancient Dragon
0
61
Member Avatar for venus87

Sometimes the comma just acts as a separator instead of an operator. [URL="http://en.wikipedia.org/wiki/Comma_operator"]See this wiki article [/URL]for more details

Member Avatar for Ancient Dragon
0
180
Member Avatar for slygoth

I don't know if this will work for you or not, but here is a suggestion update account set byprice = byprice * 2 where byprice < 20

Member Avatar for Ancient Dragon
0
65
Member Avatar for phorce
Member Avatar for akde

Unlike C, C++ requires you to typecast the return value of functions that return void*, like malloc().

Member Avatar for akde
0
263
Member Avatar for janet@123

Change the packing factor to 1 and the alignment problem will go away. [icode]#pragma pack(1)[/icode] will not put holes in the structure. The pragma is compiler dependent, some compilers may do it differently. [code] #pragma pack(1) // your structure goes here #pragma pack() // revert to default [/code]

Member Avatar for janet@123
0
271
Member Avatar for mebrahtom

Your program is writing the file in binary mode so you can't open it with a text editor such as Notepad.exe.

Member Avatar for Ancient Dragon
0
65
Member Avatar for pkrai
Member Avatar for Ancient Dragon
0
121
Member Avatar for mankamat

[QUOTE=mankamat;1102089]Hi, How do we read and write a byte array to a XML file in C++.[/QUOTE] Its very complex to do in c++ -- a lot simpler in VBA. But read [URL="http://msdn.microsoft.com/en-us/library/aa188489%28office.10%29.aspx"]these articles[/URL].

Member Avatar for stereomatching
0
653
Member Avatar for user543820
Member Avatar for Ancient Dragon
0
925
Member Avatar for beaute

You can not just arbitrarily remove __stdcall from the function prototypes because the DLL was compiled to use it. __stdcall is one of 5 calling conventions used by Microsoft (and probably others too) compilers. [URL="http://msdn.microsoft.com/en-us/library/984x0h58(v=VS.80).aspx"]Here[/URL] is a more in-depth thread about it.

Member Avatar for Ancient Dragon
0
153
Member Avatar for dhsn

[QUOTE=moasi;1687091]I've tried codeblocks but it tends not to do anything when I hit compile, or build and run[/QUOTE] Then you did it wrong. I use Windows 7 and it works ok for me. Code::Blocks is only an IDE and requires a compiler such as MinGW of Microsoft's CL. There are …

Member Avatar for nilay2141992
0
306
Member Avatar for Zssffssz

CreateProcess() isn't really all that difficult once you realize most parameters are 0. That function does not wait for the newly created process to finish. If you want that behavior then you have to call WaitForSingleObject() after calling CreateProcess(). [code] STARTUPINFO sinfo; PROCESS_INFORMATION pInfo; memset(&sinfo,0,sizeof(STARTUPINFO)); sinfo.cb = sizeof(STARTUPINFO); BOOL b …

Member Avatar for Ancient Dragon
0
188
Member Avatar for cwarn23

Well, I didn't like it either. It was very boring and the speaker was uninteresting to listen to (monotone).

Member Avatar for NicAx64
0
472
Member Avatar for GrimJack

I would like to use a machine gun to go bird hunting. We have blackbirds that fly in herds of thousands. A machine gun would be just the thing to break them up :)

Member Avatar for pseudorandom21
0
468
Member Avatar for slygoth

The problem with using magic numbers to identify a file format is that the numbers may be just coincidental to the rest of the file. For example I might have a binary file whose first few bytes are 49 49 2A 00, but that doesn't mean its a TIF file. …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for karthik.datt

Look at the string you are passing to LoadLibrary(). You are passing it the path but not the name of a library.

Member Avatar for karthik.datt
0
195
Member Avatar for ram619

Those numbers have nothing to do with the amount of memory occupied by all those strings. Its nothing more than the starting memory address of them. If you want to display the length of the strings then you have to call strlen(), such as [icode]printf("%d\n", strlen(argv[i]));[/icode] [edit]Oops! What ^^^ said …

Member Avatar for ram619
-1
158
Member Avatar for beaute

>>Yes, as far as I know, it shouldn't be a problem. (btw, I know that I am contradicting vijayan121 on this, he may be right, but I think not, I think he is being a bit over-cautious, ABI shouldn't be a problem here) >>If your DLL doesn't have the exports …

Member Avatar for vijayan121
0
627
Member Avatar for ithelp
Member Avatar for cwarn23
2
936
Member Avatar for sknake

[QUOTE=josh_banned;1063294]It's funny 'cuz the IP they banned was one globally used by the University. Dani just banned an *entire* campus of potential clients. HAHAA![/QUOTE] What Dani banned Dani can unban.

Member Avatar for pseudorandom21
2
964
Member Avatar for PapaGeek

Your program needs additional error checking -- it works ok for me [code] #include <windows.h> #include <stdio.h> #include <io.h> #include <string.h> #pragma warning(disable: 4996) int main(void) { FILE *fd; int ok; HANDLE hFile; FILETIME createTime; FILETIME accessTime; FILETIME writeTime; fd = fopen("test.txt","a+"); fclose(fd); hFile = CreateFile((LPCTSTR)"test.txt", GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE …

Member Avatar for PapaGeek
0
208
Member Avatar for brettclavier

google for "c++ ReadRemoteRegistry" and you will find several threads, like [URL="http://stackoverflow.com/questions/6582843/c-qt-how-to-access-windows-registry-remotely"]this one[/URL]

Member Avatar for MonsieurPointer
0
174
Member Avatar for ravinder yadav

Do you want your program to do other things in the meantime? If you do, then put the alert messages in another thread, but your compiler may not support multi-threaded programs. So an alternative might be to use a loop [code] time_t t1, t2; // time variables double dif; t1 …

Member Avatar for ravinder yadav
0
344
Member Avatar for ganeshan23
Member Avatar for PixelExchange

You need to capture one of the mouse events, such [URL="http://msdn.microsoft.com/en-us/library/windows/desktop/ms645608(v=vs.85).aspx"]WM_LBUTTONUP[/URL] On that page in MSDN you will also find links to all the other mouse events that you will want to study.

Member Avatar for PixelExchange
0
153
Member Avatar for peuceul

>>int a = 0; You can not put that in a header file. extern variables are always declared in a *.c or *.cpp file. Put this in the header file [icode]extern int a;[/icode]

Member Avatar for WaltP
0
1K
Member Avatar for circles

you could convert it into struct tm that's declared in time.h then call mktime() to convert that structure into type time_t.

Member Avatar for WaltP
0
192
Member Avatar for Netcode

And of those 100 new registrations daily how many are spammers???

Member Avatar for happygeek
-1
128
Member Avatar for Duece_68

What exactly does "it doesn't work" mean? Error message(s)? make sure everything was compiled in release mode, not debug mode.

Member Avatar for Ancient Dragon
0
45
Member Avatar for C++newbie chick
Member Avatar for Ancient Dragon
0
316
Member Avatar for Ancient Dragon

The St Louis Cardinals just won their 11th World Series Baseball championship against Texas Rangers. The final score was 6 to 2. The Cardinals are second only to New York Yankees for the most world series games won. The first one played was in 1903. Odd they call it the …

Member Avatar for frogboy77
0
53
Member Avatar for Cainer

call recv() twice, the first time to get just the first 4 bytes (assuming the size of the structure is at the beginning, and then again to get the rest of the structure.

Member Avatar for Cainer
0
562
Member Avatar for phfilly

[code] temp = ArrOperand[counter]; static_cast<char>(temp); perm[i] = temp; [/code] Why all that hard work??? All you need is this: [icode]perm[i] = (char) ArrOperand[counter];[/icode] -- that is, assuming the values in ArrOperand can be held in a char variable. If not, then it won't work.

Member Avatar for Ancient Dragon
0
363
Member Avatar for mameemonster
Member Avatar for mameemonster
0
115
Member Avatar for Raim

You have already stated the items in the combo box -- Day, Afternoon, Night and Mixed. Do you know how to add those items to the combo box while in Form Designor? (In the comboBox Properties page scroll down to the Items Collection and you can add them there. See …

Member Avatar for Ancient Dragon
0
399
Member Avatar for pyro 214

40-60K is only starting salary. professionals with experience can often get a lot more than that. On the west coast (USA) you could easily get double that amount -- of course you will need it because it will cost tripple to live there :)

Member Avatar for Ancient Dragon
0
1K
Member Avatar for mkab

You can not make the results of the C program permanent on the terminal. Like all other shell programs anything done within the program (or shell script) is destroyed when the program ends.

Member Avatar for mkab
0
6K
Member Avatar for beaute

[URL="http://msdn.microsoft.com/en-us/library/windows/desktop/ms683212(v=vs.85).aspx"]GetProcAddress[/URL]() probably returned a NULL pointer. [quote=MSDN]The spelling and case of a function name pointed to by lpProcName must be identical to that in the EXPORTS statement of the source DLL's module-definition (.def) file.[/quote] Notice the functions still must be exported.

Member Avatar for beaute
0
481

The End.