15,551 Topics
| |
I am calling C function from MATLAB using mex-files. The C function has a few static variables. I want to remove the static variables from the memory between consecitive calls to the C function. It is possible to do that without manually making all the variables in the C function … | |
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) … | |
| 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]; } … |
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 … | |
Whats an easy way could i display an image in a win32 program? (bitmap,gif,whatever) | |
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 … | |
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 … | |
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 … | |
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: | |
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) … | |
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 … | |
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 … | |
I just got into creating viruses(not for mallicious puposes).Does anyone know of cool techniques and stuff i could implement and how? | |
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 … | |
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 … | |
Can anyone help me on how to reverse string using c language.Like for example "abc" to "cba".Is it simple as in java? | |
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 … | |
I Want A Program For Cryptography Rsa And Md5 Algorithms Pls Help Me!! | |
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 … | |
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 … | |
like .... CString name[5]; for(int i=0;i<5;i++) name[i]="Jack"; .... is this the right way? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
[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 … | |
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 … | |
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 … |
The End.