209 Posted Topics

Member Avatar for u8sand
Member Avatar for nbaztec
0
194
Member Avatar for kiwihaha

If you have not included class.h in your project, include "struct.h" in "class.h" instead of main.

Member Avatar for kiwihaha
0
1K
Member Avatar for web3

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.

Member Avatar for Ancient Dragon
0
234
Member Avatar for iqra123

[QUOTE]atoi() not giving correct answer[/QUOTE] This has nothing to do with your [B]no_of_process ()[/B] returning 0.

Member Avatar for nbaztec
0
107
Member Avatar for andrewll2

[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 …

Member Avatar for andrewll2
0
367
Member Avatar for RehabReda

[QUOTE]AFAIK c++ is not used for web based applications.[/QUOTE] Yes, you're right. It's pretty much Java, JavaScript & PHP.

Member Avatar for nbaztec
0
109
Member Avatar for akand

[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 …

Member Avatar for tesuji
0
547
Member Avatar for vicpdfl117

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 …

Member Avatar for nbaztec
0
182
Member Avatar for ashima 2

[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.

Member Avatar for dhruv_arora
0
134
Member Avatar for fernandofranca

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.

Member Avatar for nbaztec
0
203
Member Avatar for aliyami90
Member Avatar for kevinyu

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 …

Member Avatar for kevinyu
0
106
Member Avatar for iqra123

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) …

Member Avatar for nbaztec
0
129
Member Avatar for dchunt

[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]

Member Avatar for nbaztec
0
106
Member Avatar for SJP99

[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 …

Member Avatar for SJP99
0
146
Member Avatar for charlie4oct

[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().

Member Avatar for nbaztec
0
81
Member Avatar for adamomo

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'.

Member Avatar for nbaztec
0
118
Member Avatar for dhondie87
Member Avatar for nbaztec

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, …

Member Avatar for nbaztec
0
351
Member Avatar for neti1987

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.

Member Avatar for nbaztec
0
1K
Member Avatar for nbaztec

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 …

Member Avatar for gashtio
0
206
Member Avatar for akssps011

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 …

Member Avatar for akssps011
0
96
Member Avatar for Ferny84

[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] …

Member Avatar for Ferny84
0
135
Member Avatar for newcoder777

[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 …

Member Avatar for newcoder777
0
287
Member Avatar for NH1

[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.

Member Avatar for nbaztec
0
102
Member Avatar for jp071

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 …

Member Avatar for nbaztec
0
160
Member Avatar for jen5376

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]

Member Avatar for jen5376
0
150
Member Avatar for wade2462

[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]

Member Avatar for wade2462
0
342
Member Avatar for Sandhya212
Member Avatar for Sandhya212
0
221
Member Avatar for anuragcoder
Member Avatar for gameon

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.

Member Avatar for Aia
0
193
Member Avatar for new2programming

1. Replace '' with '\' 2. Use parameter SND_NODEFAULT to suppress the beep when no file is found. 3. PlaySound can only play .wav files.

Member Avatar for nbaztec
0
109
Member Avatar for ahaykal

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]

Member Avatar for nbaztec
0
178
Member Avatar for Prota

I need to see your class for that and also which data members are used for storing what.

Member Avatar for Prota
0
110
Member Avatar for BaluM

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.

Member Avatar for BaluM
0
331
Member Avatar for xaop

[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) …

Member Avatar for abhimanipal
0
112
Member Avatar for anuragcoder

[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.

Member Avatar for abhimanipal
0
198
Member Avatar for ghost_from_sa

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 …

Member Avatar for nbaztec
0
207
Member Avatar for speedy94519

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 …

Member Avatar for nbaztec
0
119
Member Avatar for shereefatef

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 …

Member Avatar for nbaztec
0
273
Member Avatar for xenanovich

[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

Member Avatar for xenanovich
0
181
Member Avatar for HoldmysunnyD

[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 …

Member Avatar for HoldmysunnyD
0
89
Member Avatar for james85

[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).

Member Avatar for nbaztec
0
110
Member Avatar for ssmg

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.

Member Avatar for nbaztec
0
366
Member Avatar for carrythe1

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.

Member Avatar for nbaztec
0
2K
Member Avatar for farhanafzal

[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 …

Member Avatar for nbaztec
0
232
Member Avatar for xenanovich
Member Avatar for Swiftle

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.

Member Avatar for nbaztec
0
157
Member Avatar for sdinu96

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 …

Member Avatar for abhimanipal
0
112
Member Avatar for sdinu96

What are you trying to achieve by assigning a (char*) an (int), which is illegal by the way Please be more clear.

Member Avatar for Ancient Dragon
0
89

The End.