209 Posted Topics
Re: Are you sure that the Window isn't destroyed? Check in task manager. | |
Re: If you have not included class.h in your project, include "struct.h" in "class.h" instead of main. | |
Re: conio.h is a header file which comes with Borland compilers. If you're on VC++ you may ask some one to give it to you ( I can) but I'm not sure whether it will work or not. BTW it's not standard. | |
Re: [QUOTE]atoi() not giving correct answer[/QUOTE] This has nothing to do with your [B]no_of_process ()[/B] returning 0. | |
Re: [QUOTE]I read that it is possible without using a dll file since it's low level[/QUOTE] Yes it is. So what's the problem? [B]a)[/B] From what I see this HOOK isn't global but limited to your calling thread. The procedure is hooked top-priority for your CURRENT thread ONLY. Ditch the last … | |
Re: [QUOTE]AFAIK c++ is not used for web based applications.[/QUOTE] Yes, you're right. It's pretty much Java, JavaScript & PHP. | |
Re: [QUOTE]Quote originally posted by lionaneesh ... Sorry dude! but i don't know anything about SQL.... Well, see that's the problem. If you want to work with MySQL then you will have to learn SQL, or at least the basics.[/QUOTE] He is not the OP. akand, Ancient Dragon is right you … | |
Re: I don't think you can store EXEs as resource data. The best you could do is to attach that EXEs code to your Main EXE & upon running it read & save that EXE's code to disk. Though it will be completely inappropriate & unwanted. Why don't you use the … | |
Re: [QUOTE]plz send me some imp in c & c++ urgently my exam is after 2 days[/QUOTE] Daniweb does not do stuff like this. If you have a problem with *those* question we are happy to help you. You should google for some of your "institution's" previous year papers instead. | |
Re: Best practice would be to create a File2.h which defines functionX()& include it: [CODE] #include <iostream> #include <cstdio> #include "File2.h" //<-- int main() { printf("teste"); functionX(); return 0; } [/CODE] else include File2.cpp instead of File2.h there. | |
Re: Isn't VirtualAssist spamming links? I think every forum disapproves of this. | |
Re: 1. Use better variable names. 2. Use malloc() to allocate memory for the Number of inputs a. Or a static array. 3. Input All numbers. 4. Loop To check for Odds, display & sum them. 5. Loop To check for Evens, display & sum them. 6. Display sum. (You can … | |
Re: What do you exactly mean when you say this: [QUOTE] result for those paramters is shown on agent's own terminal window....where as i want them on manager's window. [/QUOTE] In case you meant what I think you did, you are sending the returned request to yourself(agent). Please check your a) … | |
Re: [QUOTE]better stream classes[/QUOTE] stringstream. [QUOTE]better array implementation[/QUOTE] vectors. Other than that. If you just want to omit & read the first 256 chars why not you use: [CODE]nm1.open("as86.txt",ios::in|ios::binary); char arr[257]; //+1 for null nm.read(arr,256); while(nm.read(arr,256)) { //Read more. } nm.close(); [/CODE] | |
Re: [QUOTE]I know this gets asked a lot but i want to make a program that sends me some form of an alert at a certain time of day. I am using windows 1. i want it too run invisibly so no windows, doesn't show in task bar, or task manger … | |
Re: [QUOTE]You should look into ifstream and cin and the >> operator.[/QUOTE] cin is console input & cout is console output. David is right on spot. You can also use cin.getline(). | |
Re: I suggest you use [URL="http://msdn.microsoft.com/en-us/library/ms644946(v=VS.85).aspx"]PostThreadMessage()[/URL](Windows only) and parse that message in the WindProc of the client. Point 'b' beats me. 'c' should be achievable from answer to 'a'. | |
Ok, I need to know some methods(links, articles, etc.) regarding how to parse & comprehend 32-bit grayscale bitmaps on the basis of their data. Suppose I have a black background & a white primitive of medium resolution is there any way I can identify the primitive as a Circle, Box, … | |
Re: A better and more efficient way is to create an onTerminate() Even for your thread which is called when the thread A terminates. It will be better manageable & you can pass a pointer to the function in the thread initialization. | |
I am creating a winsocket app & want to know that if there's a method available to fetch the Dynamic IP of the local machine & not it's local address. For eg: my local address may state 192.168.1.3 but my dynamic IP is depedent on my ISP location like 59.114.25.10 … | |
Re: You have to define the virtual functions in their derived classes. [CODE] int myProjPlugin::speed() const //want suggestion here { return m_speed; } int myProjPlugin::direction() const //want suggestion here { return m_direction; } [/CODE] [QUOTE] error: ‘m_speed’ was not declared in this scope error: ‘m_direction’ was not declared in this scope … | |
Re: [CODE]int marks[] = {};[/CODE] This should have been an error. Your leaving the compiler to decide the size of array but your not initializing it.The size of array is 0. Solutions: 1. [CODE]int marks[50]; //Static Initialization[/CODE] 2. [CODE]int *marks; marks=(int*) malloc( noOfMarks );//Dynamic Initialization. Do ckeck if it returns NULL.[/CODE] … | |
Re: [CODE]1.2ms , 1.5ms and 1.8ms.[/CODE] That's an awfully small delay. The best I could get is a perfect 10ms delay. Sometimes about 5ms(rare). Don't know if this small delay is possible or not. You can try calling a function(read: Any custom function) to get you a delay this small. But … | |
Re: [QUOTE]"No matching prototype available"[/QUOTE] [QUOTE]"Too many parameters"[/QUOTE] Don't you think it's pretty obvious? Your using too many arguments(7) in the function GetOpenSaveFile(), the compiler cannot find the function definition. The function will accept <7 arguments. | |
Re: AFAIK if you do happen to make that form, it will stop responding as it will be inside a loop (correct me if I'm wrong). You can do the following: 1. Use Asynchronous timer for painting text on form. 2. Use a separate thread for the form & change it's … | |
Re: OK, this might be considered cheating and would probably be the worst-basic-solution, but here goes nothing: Can't you store the verse's in a 2-d array, word-wise then increment index using recursion? [CODE]char arr[][50]={"Word1","Word2"...}; [/CODE] | |
Re: [CODE]MessageBox(NULL, "\tHello World!", "My first windows app", NULL);[/CODE] Change to [CODE]MessageBox(NULL, L"\tHello World!", L"My first windows app", NULL);[/CODE] | |
Re: You can use sprintf() [CODE] <stdio.h> sprintf(fileName,"iterfile%d",i); [/CODE] | |
Re: Personally I'm all against system() calls. | |
Re: system() calls should ALWAYS be avoided at all cost. P.S. "ls" is for Linux & "dir" is for Windows. findfirst and findnext are the functions you're seeking. You may need to use recursion to search deeper into directories. | |
Re: 1. Replace '' with '\' 2. Use parameter SND_NODEFAULT to suppress the beep when no file is found. 3. PlaySound can only play .wav files. | |
Re: Something like this? [CODE] FinancialAid* operator += (const int incValue) { this->Siblings+=incValue; return this; } FinancialAid* operator -= (const float decValue) { //Perform the desired checks this->tuition+=decValue; return this; } [/CODE] | |
Re: I need to see your class for that and also which data members are used for storing what. | |
Re: First Use a program like [URL="http://download.cnet.com/BinViewer/3000-2352_4-10517941.html"]BinViewer[/URL] to actually see if the content is written to the file. | |
Re: [CODE]if (0<n<18) printf("You are still a kid"); else if (18<=n<30) {printf("You are an adult"); else if (30<=n<60) {printf("You are a middle-aged person"); else if (60<=n) {printf("You are a senior citizen"); else {printf("Wow !!!");[/CODE] You have placed braces before printf. Remove them. EDIT: You code would look more appealing(read: not Horrible) … | |
Re: [CODE] char *fname=0;//Change to char fname[50] or fname[256] for max limit on Windows cin >> fname; [/CODE] Bad idea! you are passing a pointer to cin which is not referring to any variable. Use an array. Also try using fgets() or gets() as cin doesn't take white spaces. | |
![]() | Re: To delete a record you have 2 options depending upon the size of Database: 1. Copy everything into a buffer, delete values in the buffer & output them to file again. 2. Start copying everything to buffer skip the matching record & output them again. 3. Instead of allocating a … |
Re: You can try rounding up yourself. Since you want to round up to 2 decimals, the general format I use is: [CODE] Number + (10^(-Precision))/2 [/CODE] In your case it is: [CODE] -> 3.195 + (10^(-2))/2 -> 3.195 + (0.01)/2 -> 3.195 + (0.005) -> 3.20 [/CODE] AFAIK printf() will … | |
Re: If you actually own the written data and it is put though an array or class use fseek: [CODE] //For example to fetch record #5 fseek ( File , (5-1)*sizeof(CLASS) , SEEK_SET ); fread ( &VAR , 1 , sizeof(CLASS) , File ); /* Here CLASS can be replaced by … | |
Re: [CODE]char new[15][3];[/CODE] Make it: [CODE]char new[3][15];[/CODE] [15][3] Means 15 rows of 3 cols [3][15] Means 3 rows of 15 cols | |
Re: [QUOTE]with allocations from the front and insertions at the end[/QUOTE] You mean a Queue? [CODE] /* */ /* queue.c */ /* Demo of dynamic data structures in C */ #include <stdio.h> #define FALSE 0 #define NULL 0 typedef struct { int dataitem; struct listelement *link; } listelement; void Menu (int … | |
Re: [CODE]/* say numbers are 2,8,15,51 so upperLimit=51 & lowerLimit=2 */ int num; do num=rand((51-2)+1)+2; //This I deliberately did to denote uLimit & lLimit while(num!=n1 && num!=n2 && num!=n3 && num!=n4);[/CODE] rand(x) will always return a number from 0 to (x-1). | |
Re: If you can wait I'm on the verge of finishing my SyntaX Highlighter which features WORD 03 portability. I'll be upping it maybe tomorrow. | |
Re: There is a specific property for Forms. It is Enabled. I'm not sure about MFC as I do only VCL. If however they are separate thread, which I doubt they are, I recommend using WaitForInputIdle(); GDI function. | |
Re: [CODE] PS: Avoid using scanf. It has lots of hidden problems. Shift to fgets instead [/CODE] But fgets is only for inputting strings while the OP requires integers and scanf() is pretty much suffice for the poster at this point. scanf() may not have nice error-checking techniques but it sure … | |
Re: What exactly is the problem. Sample Output? | |
Re: Why dont you try adding to your list(class) 2 components: [CODE=cpp] unsigned int maxItems; unsigned int currItems; [/CODE] And everytime you add items increment currItems, and if it nears maxItems(=10) you increment maxItems(allocate space) to 20. | |
Re: This is plain stupid. 1. You don't wrap code in code tags 2. You double post. 3. What are you trying to achieve by assigning a (char*) an (int), which is illegal by the way 4. When you say 17th line did you expect me to count all the way … | |
Re: What are you trying to achieve by assigning a (char*) an (int), which is illegal by the way Please be more clear. |
The End.