15,300 Posted Topics
Re: -- when my parents took me fishing, I had one foot on the boat and the other on the bank ... well I suppose you imagine what happened as the boat started floating away :) -- when my sister and I got into a flour fight. -- when my wife … ![]() | |
Times are not getting updated. I made a post about a half hour ago and whan I returned just now the Last Post column said it was just 1 minute ago :) So I though maybe I just need to deleted temp internet files -- but that didn't fix the … | |
Re: You have to add the main() function that includes all the code that does the things you stated in your questions. Will I write it for you? NO. You will learn nothing if I do that. | |
Re: Did you find those terms used in a textbook you are reading? Indexed addressing would just mean accessing a specific element of an array with an integer variable. [code] int array[5]; int index = 1; array[index] = 123; // indexed addressing mode [/code] My guess is that [b]indirect addressing[/b] would … | |
Re: I usually try to tip 15% -- never 20%, at least not intentionally. | |
Re: I got 7 pages of threads and all of them said they had 0 replies. | |
Re: [QUOTE=ardav;1205110]If you don't want her, give her my personal email address.[/QUOTE] I'll gladly forward them all to your PM box too :) | |
Re: Maybe [URL="http://www.lvr.com/usb.htm"]this[/URL] will help you | |
[URL="http://www.youtube.com/watch?v=IzO1mCAVyMw&NR=1"]Very humerous and true too[/URL] | |
Re: IMHO ditch that crappy CSingleLock class and use CriticalSection since it works for you the way you want it to. | |
Re: First, do no use two different loops to calculate the minimum and maximum values -- do that all in the same loop. When the program gets to that second loop to calculate the minimum value the file pointer is already at end-of-file so the loop don't do anything. Just combine … | |
Re: >>P.S I don't and won't use string, my GUI doesn't like it. It doesn't like it most likely because you tried to pass std::string to a function that expects char*. To fix that all you have to do is use string's c_str() method. [icode]foo( mystring.c_str() );[/icode] | |
Re: >>I can compile and run the program Not with Dev-C++ you didn't. >>"gotoxy(15,2)"; What the hell is that! Why did you put a function call in quotes? Answer: because you most likely plagerized this code from someone else who write it for Turbo C. You should have just deleted those … | |
Re: When you enter a character on the keyboard you actually type two things -- the character and the Enter key. Right? Well, your program is not removing the '\n' cause by the Enter key from the keyboard buffer. [URL="http://www.daniweb.com/forums/thread90228.html"]Read this thread [/URL]how to do that. | |
Re: Towards the last half of the code you posted you have a bunch if multi-line if statements that are not surrounded by { and }. [code] if( something ) { // blabla } else if( somethingelse ) { // blabla | [/code] | |
Re: Easily done with SQL. SELECT Username,Name,Login.Group,Groupname FROM Login, Group WHERE login.Group = Group.Group | |
After posting a response to one of the threads listed by the Unanswered Threads link, the thread still appears when that link is clicked again. It shows that I've answered it, but it shouldn't be in that list at all now becuse it ain't no longer unanswered :) | |
Re: Just logged on after 24 hours. 1) I liked the revised buttons that are now clickable. That's a good improvement 2) Don't like the way the badges were implemented. Although they are usable they are not as nice looking as in the previous version of DaniWeb. In previous versions it … | |
Re: >>What happens if a pointer is deleted twice Depends. If you set the value of the pointer to 0 after the first delete then nothing will happen. But if you don't then the program will probably crash. >>value or pass by reference Nothing -- almost. They both have the same … | |
Re: >>What to learn first: .net, win32 or MFC None of the above. The next step is to learn c++ because both MFC and .NET use c++ extensively. After c++ I would probably learn CLR/C++, saving MFC for last, if at all. It would be better choice to learn C# than … | |
Re: Write the program in small steps, don't try to do everything all at once. Start out by writing the program that does nothing more than display the menu. Get that coded, compiled without error, and tested. Once you do that then go on the the next step which would be … | |
Re: Probably because that code prints the EOF character. Try this one. Variable C needs to be int, not char. [code] int c; while( (c = getchar()) != EOF) putchar(c); [/code] | |
Re: Use VC++ 2010 Express and it has a toolbar that contains all available standard controls. Go to www.codeproject.com and they have lots more of them. | |
Re: How are you trying to scan? I have HP Officejet 6500 and the HP program that worked great on Vista is not yet supported on Win7. So I have to use Windows Fax & Scan program which HP recommends on their support site. Click on the Start icon in the … | |
Re: The first problem is that you are attempting to use unallocated pointers -- can't do that. You have to allocate space for all the characters you want to put into them. Declare them something like this: [icode]char str[255] = {0};[/icode]; You can replace the value of 255 with anything you … | |
Re: The structure st is wrong and you don't need to malloc() anything. Actually you don't need that structure at all unless you intend to add some other members later on. abc.txt -- is it a text file (you can red it with Notepad) or a binary file (Notepad just shows … | |
![]() | Re: Look in the boost libraries, I think it has an xml parser. |
Re: [QUOTE=centrinostyle;289647]c program to find largest number in an array[/QUOTE] what about it? have you tried to do this? If you have, then post your code so that people here can help you with your questions. | |
Re: use getline() to read the file line by line, then parse the string >>getline() does not work with no arguments Of course not -- you have to pass appropriate argument [code] std::string line; ifstream inFile("filename.txt"); while( getline(inFile, line) ) { // blabla } [/code] | |
Re: see [URL="http://www.webopedia.com/TERM/C/CGI.html"]CGI Programs[/URL] | |
Re: Maybe this will help [icode] int *remain[] = {remain1,remain2,remain3,remain4};[/icode] | |
Re: You could try [URL="http://www.programmingforums.org/forum64.html"]Sane's Monthly Algorithms Challenges[/URL] which are designed for people of all programming levels. | |
Re: >> typedef unsigned short int HWND; // 4 bytes Maybe, and then again maybe not. On my computer (windows 7) sizeof(short) = 2 bytes, not 4. But of course that comment has nothing to do with your problem >>well part of the header file, it's rather long) Check the header … | |
Re: Obama is the smoothest talker of the bunch. Hillarity Klinton wants to cut all the senior citizen's social security and medicare benefits, freeze all raises for the next 4 years, and cut all military pay and benefits. She has already written/sponsored a bill to do exactly that. That's terrible. | |
Re: >> I keep getting a 1.#f That means it is a very large or very small number. Add [b]fixed[/b] to the cout line and cout will display it correctly [icode]cout << fixed << 0.000001 << '\n';[/icode] | |
Re: You can't keep the user from typing on the keyboard but you can remove all remaining keys from the keyboard input buffer. If you are using c++ cin then read [URL="http://www.daniweb.com/forums/thread90228.html"]this thread [/URL]to find out how to flush the input buffer. | |
Re: LIne 23: subkey can not be "" or NULL. You want to put key1 there. | |
Re: For those of us (like me) who have no clue who St George was, [URL="http://http://www.royalsocietyofstgeorge.com/stgeorge.htm"]here is a link[/URL] | |
Re: You can put the implementation code in the header file (called inline functions) and not use the implementation file. But I'd only use this technique for small methods. [code] #ifndef FOO_H_ #define FOO_H_ class foo { public: foo() { _x = 0; { virtual ~foo() { { void SayHello() { … | |
Re: I ran this short test on VC++ 2010 Express and Code::Blocks [code] int main() { if ( -1 < ( unsigned char ) 1 ) printf("true 1\n"); if ( -1 < ( unsigned short ) 1 ) printf("true 2\n"); if ( -1 < ( unsigned int ) 1 ) printf("true … | |
Re: That is C code you posted, not assembly. If its a C program you are writing then you are in the wrong board. Let us know which is it and one of the mods will move this thread for you into the right board. | |
Re: I would make table a vector instead of array of strings so that it can hold as many strings or as few as you want. [icode]vector<string> table;[/icode]. IMHO that hash line is probably much less efficient than just adding the new string to the next available slot in the array. … | |
Re: NULL is used for pointers, not integers. Just call vector's resize() method if you want to have a 10x10 matrix of integers, and you have to resize() each row of the vector individually in a loop. The resize() method will set the values to 0. | |
Re: [QUOTE=koved;1215533]i think it shoud end with \0 or nothing is required over there[/QUOTE] Not necessary -- the compiler will generate the '\0' null terminator. But the { and } characters are unnecessary. | |
Re: You have several choices 1) open a pipe to the ls command 2) redirect the output of ls to a file, then open and read the file 3) generate the result yourself by using opendir() and readdir() standard C POSIX functions. But you will most likely want to create an … | |
Re: VC++ also has intellsense. I've found that the -> sometimes has problems and does not show the list of items that you might expect it to. There are intellsense options in menu Tools --> Options, but its turned on by default. |
The End.