15,550 Topics

Member Avatar for
Member Avatar for atrusmre

I am writing a MFC application and need to have the program pause for a few seconds. I am trying to use the OnTimer event and am having troubles. The following code causes the program to freeze and stop responding [code=c] m_iCount = 0; SetTimer(ID_TEST_TIMER, 1000, NULL); while(m_iCount <= 5) …

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

here's a piece of window procedure. What does DefWindowProc do in this program. [code] LRESULT CALLBACK WndProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { switch(Msg) { case WM_DESTROY: // user wants to exit PostQuitMessage(WM_QUIT); break; default: // Hand off unprocessed messages to DefWindowProc return [B]DefWindowProc(hWnd, Msg, wParam, lParam)[/B]; } …

Member Avatar for Ancient Dragon
0
104
Member Avatar for dev.cplusplus

Hi I to all I have the following question, I hope you can help me: I need to store variables, in diferent variable types, but I want to know for example the size of the int type what size of number I can store, I found that int can store …

Member Avatar for jbennet
0
84
Member Avatar for chunkmartinez

Whats an easy way could i display an image in a win32 program? (bitmap,gif,whatever)

Member Avatar for chunkmartinez
0
81
Member Avatar for kumarangopi

Guyz Iam happy to say that i moved little.Iam able to run the exe file without header files.It just needed egavga.bgi graphic drive.So i have to copy my exe file and egavga.bgi to other system to make the exe work.My point is i want my program to create egavga.bgi dynamically …

Member Avatar for WaltP
0
287
Member Avatar for aismm

Basically the user enters one of the following + - * / % | < > c q followed by one or more spaces, followed by an integer, and then the newline key to get the answer and the current vaule is set to 0 then it keeps on adding …

Member Avatar for WaltP
0
143
Member Avatar for JRM

I have been using Codeblocks, but I think I need to better understand what the "project" concept is all about. My original assumption was that it was a group of source, header and object files that pertained to a particular project. I'm discovering, however, that the IDE doesn't like more …

Member Avatar for manutd
0
178
Member Avatar for paradoxxx

Hey all, I have an array of uppercase letters, mixed with other non-alphaitalic charcters. I need to keep a frequency of the each of the uppercase letters, and how many other characters entered. JONN:sad:

Member Avatar for John A
0
228
Member Avatar for JRM

hello all, I moved a source file from a cgywin file to codeblocks. The file compiled and ran just fine in the cgywin environment. However, the same file under codeblocks complains about an undefined reference to winmain. error: [code] Project : Console application Compiler : GNU GCC Compiler (called directly) …

Member Avatar for Salem
0
74
Member Avatar for l2u

Hello Im working on a huge server on windows and im not sure what approach for multiclients should I use.. I know multithreading is not good, so I've been using non-blocking sockets until now (1 thread), which has limitation but this can be easily changed.. I wondered what do you …

Member Avatar for WolfPack
0
73
Member Avatar for dev.cplusplus

Hi, to all, I'm having the following problem: I'm trying to convert a CString to long(or number), but the number that is in the Cstring is too big and I loose data of the number. I was thinking in using instead of long use the variable ULONGLONG, but the problem …

Member Avatar for dev.cplusplus
0
117
Member Avatar for chunkmartinez

I just got into creating viruses(not for mallicious puposes).Does anyone know of cool techniques and stuff i could implement and how?

Member Avatar for Ancient Dragon
-1
68
Member Avatar for Mr.UNOwen

How do you create a text file in c with any file type name in the back, such as file.abc or file.gcs or any other dot something. I'de like know how to do it the portable way, but if not, just let me know how to do it for win …

Member Avatar for Mr.UNOwen
0
26
Member Avatar for degamer106

I'm having trouble parsing a line with sscanf. My line is: 1941 How Green Was My Valley; John Ford and I want to separate it into a number, string, and another string. I tried: [CODE] if ( sscanf( buffer, "%d %41[^;] %51s", &pMovie->year, &pMovie->title, &pMovie->director ) == 3 )[/CODE] But …

Member Avatar for degamer106
0
89
Member Avatar for Einal

Can anyone help me on how to reverse string using c language.Like for example "abc" to "cba".Is it simple as in java?

Member Avatar for Nick Evan
0
50
Member Avatar for Harshita_garg

Hi guys!!! This is my first post on daniweb & i hope i find a solution to my problem.I am developing a software that makes extensive use of Matrices.i have used dynamic memory allocation for matrices.Now this program makes lots of iterations.It works upto certain iterations say 56 after which …

Member Avatar for andor
0
117
Member Avatar for beatle555
Member Avatar for ~s.o.s~
1
251
Member Avatar for Bobbiegirl

I am new to this C thing and am triny very hard to understand but am having a little problem getting thing to work. I have a project that I have been working on and cannot seem to get it to work. This is what I have so far and …

Member Avatar for ~s.o.s~
0
139
Member Avatar for linq

I know how to read string values from Access db, like: CString strFields[5]; COleVariant varstring for(field=0; field<5;field++) { recordset.GetFieldValue(field, varstring); strFields[field]=V_BSTRT(&varstring); } then the string value from db. goes into strFields But what if I know the strFields, and want write to update the db. Does anyone know the adverse …

Member Avatar for Ancient Dragon
0
85
Member Avatar for linq

like .... CString name[5]; for(int i=0;i<5;i++) name[i]="Jack"; .... is this the right way?

Member Avatar for Ancient Dragon
0
96
Member Avatar for aznballerlee

How do I shift my arrays .. starting at a position in the middle of the arrays .. to one place to the right? I tried using a for loop, but it doesn't work. [B]Here is my task:[/B] int insert(string a[], int n, string s, int pos, int max); Insert …

Member Avatar for Ancient Dragon
0
2K
Member Avatar for degamer106

I have the following declarations: [CODE]typedef struct{ int year; // key char title[51]; char director[41]; } MOVIE; typedef struct node{ struct node *left; MOVIE *movie; struct node *right; } TREE_NODE;[/CODE] lets say I create a TREE_NODE called root. Why can't I do this declaration? [CODE]root->movie->year = 1990[/CODE] Whenever I try …

Member Avatar for degamer106
0
100
Member Avatar for aznballerlee

My task for this function is to find the index of the <= string in the array. If more than one string, then retrun the smallest index of such string. Retunr -1 if no elements in array. I came out with a rough code. I hope what I did was …

Member Avatar for aznballerlee
0
112
Member Avatar for boujibabe

I have a palindrome program.Is there a way to ensure user input terminated in a string by a punctuation mark (e.g. ‘!’, ‘.’, or ‘?’.) in an array? And how do i get the program to exclude commas? eg A man, a plan, a canal, Panama! bosters a problem because …

Member Avatar for ~s.o.s~
0
448
Member Avatar for pointers

Hi, I hav defined an array of n elements.Each element represents a structure. Like, [code=c] typedef struct { int dd; int mm; int yyyy; }srik; srik a[n]; [/code] Then how to assign a date (eg:02/07/1984) as a string("02071984") to the first array element(means the first structure) in the array. I …

Member Avatar for Ancient Dragon
0
102
Member Avatar for Savage221

Hello, for the final part of my program I need to count how many letters appear throughout a pretty large input file. Opening the file, storing to an array, etc.. is all taken care of. I'm clueless on how to count each letter that occurs. I've read structures are the …

Member Avatar for WaltP
0
101
Member Avatar for muzzy_cush

[B]I was just wondering how to align data like this:[/B] [code] McBride, Susan $ 1000.00 $ 95.00 5 O'Hara, Catherine $ 2500.00 $ 299.51 5 [/code] [B]To make it look like this:[/B] [code] McBride, Susan $ 1000.00 $ 95.00 5 O'Hara, Catherine $ 2500.00 $ 299.51 5 [/code] The second …

Member Avatar for Ancient Dragon
0
127
Member Avatar for jess_redrose

Hi everyone, I've worked on this thing for about three days now and am really getting frustrated. I need to make a stack using linear linked lists of arrays. I've got my class to compile without complaining, but am really struggling with the function definitons of push and peek. Any …

Member Avatar for Ancient Dragon
0
117
Member Avatar for tehloki

Hey, it's me again, with another problem on an assignment. The input/output looks like this: [I]Enter the wind speed on the Beaufort Scale: [COLOR=red]7[/COLOR] Enter the number of boats racing (1-10): [COLOR=red]7[/COLOR] Enter the code for boat 1: [COLOR=red]LASE[/COLOR] Enter the time for boat 1: [COLOR=red]29:41[/COLOR] Enter the code for …

Member Avatar for tehloki
0
214
Member Avatar for boujibabe

I'm trying to find a way to convert a number in any given base to decimal and then to the target base. What i'm asking is how will I represent this procedure in the function for example 123 base 4 to decimal= 1x4^2+2x4^1+3x4^0=27. I was thinking of decrementing the raised …

Member Avatar for boujibabe
0
119

The End.