15,300 Posted Topics
Re: >>I want to make a real time 3d aquarium' Not possible on MS-Windows because the os is not a real-time os. When you buy VC++ compiler you get all the present and future service packs that they produce for that compiler. I would imagine you can write your program with … | |
Re: >>time_t now = time(res[i][1]); That's wrong -- the parameter to time is a pointer to a time_t object. I don't know what you are passing but it isn't time_t* If you are attempting to convert the date/time in the result set to time_t, that is the wrong way to do … | |
Re: If you want to convert that to c++ then you will also have to select a platform, such as MS-Windows, MAC, *nix, etc. Then you have to select a GUI library. wxWidgets and QT are pretty portable among platforms. You can use pure win32 api functions, but of course you … | |
Re: This works for me [code] int main() { char Seg_String[] = "2000;ON_0;1000;ON_2"; char* ptr = strtok(Seg_String,";"); while(ptr) { printf("%s\n",ptr); ptr = strtok(NULL, ";"); } } [/code] | |
Re: >>Also can anybody explain me the differance between Visual C++ and Visual C++.NET? That's an easy one -- none. Two different names for the same compiler (assuming the same version produced since 6.0). | |
Re: [QUOTE=mimo77;668422]but i don't know what's goin on it's really hard to me to do this project so i'm stuck here,,,, peace out[/QUOTE] OMG! If you think this is hard just wait until you have to learn all those billions of chemical elements and 400-level math courses. As someone I know … | |
Re: This question has been asked and answered millions of times. [URL="http://www.google.com/search?hl=en&q=how+to+maximize+the+command+prompt+window"]Click here[/URL]. | |
Re: You might try [URL="http://msdn.microsoft.com/en-us/library/cc265969.aspx"]AttachProcess()[/URL] -- beyond that I don't know. | |
Re: what is the error message? Check the spelling to make sure it is spelled correctly -- don't assume. | |
Re: must be something in your code because template classes are passed by reference all the time -- most common is probably fstream. | |
Re: delete the semicolon on line 4. defines don't end with a semicolon. It would be better to use a const int instead of that #define [icode]const int ingresos_totales = 5;[/icode] | |
Re: line 26: that just caused a memory leak. Where did the memory allocated by new operator on line 16 go??? Answer: the Bit Bucket. You have to call delete[] before reusing that pointer on line 26. >>I am not able to perform the step "out.write((char *)&i,5);", Suggestion: Create a [b]static[/b] … | |
Re: [QUOTE=jasimp;665306]Generation Y will be the downfall of America.[/QUOTE] The older generation has ALWAYS said that about the younger generations. Yet, we are still here :) [QUOTE=R0bb0b;665309]They certainly are good at ruining music. [/QUOTE] There has not been a good piece of music written since 1961 with the sole exception of … | |
Re: >>She will be met in the afterlife by her husband, Raymond, her son, Paul Jr., and daughter, Ruby. Yes -- use the mod operator. such as seconds = secs % 60. | |
Re: what compiler and os are you using? Are you trying to compile a C file with *.c extension? The only CString class I know of is in Microsoft's MFC library. | |
Re: What is the client sending? If "Hello" does it xmit the terminating string NULL byte? (6 characters) ? Have you printed out what the server is receiving? Does DieWithError() ever get called? >> if(test == echoBuffer) That will ALWAYS fail because all that is toing is testing the address of … | |
Re: >>1. Sort link list A in ascending order using a special sorting function by passing a pointer to the function. Your selection_sort function does not mee that requirement. Is selection sort algorithm required? or can you use any sort algorithm you want? And where is the parameter ? | |
Re: Tech support for what? hardware ? software? If hardware, then you might investigate what local junior colleges have to offer. You will have to become intimetly familar with computer hardware if you want to get a job as a tech support representative for some manufacturer or other company. Junior college … | |
Re: What can't you figure out? Do the math on paper first so that you can easily find the total pay. if the hours exceed 40 then you have to pay 1.5% for overtime. | |
Re: >>The outcome is not write. [b]write[/b] means to scribble something on a piece of paper or in a file. What you want is the word [b]right[/b] which means correct. 1) All arrays are numbered from 0 to the number of elements in the array. In your example the array has … | |
Re: Watch the [URL="http://msdn.microsoft.com/en-au/beginner/bb964629.aspx"]video here[/URL] To compile a C program just create an empty console application then add the *.c file(s) to it. | |
Re: Ironically, the Pope also said in Austrailia [quote]"Our world has grown weary of greed, exploitation and division, of the tedium of false idols and piecemeal responses, and the pain of false promises," he told the crowd. [/quote] On the one had he complains about the falling US dollar, but denounces … | |
Re: I can't, but you might start your research with [URL="http://www.google.com/search?hl=en&sa=X&oi=spell&resnum=0&ct=result&cd=1&q=cpu+scheduling+algorithms&spell=1"]these google links[/URL] | |
Re: [QUOTE=vijayan121;670996][ICODE]> cat my_file.txt | grep ^ | wc -l[/ICODE][/QUOTE] That doesn't satisfy the c++ requirement. If the op is writing shell scripts that would be perfect, but this isn't shell script programming. | |
Re: [URL="http://www.gidnetwork.com/b-56.html"]click here [/URL]to see the problems with gets() >>but then you have to press the keyboard twice in order to input data.. You could write your own keyboard input function that replaces gets() and uses only getch() to get the keys. Of course if you do that then you will … | |
What TV or radio commercials really stick in your mind? Here's one that I really liked [url]http://www.youtube.com/watch?v=VXHHaGi4grc[/url] | |
For those of you who have been working for some time I'd like to find out what practical uses you have seen for recursion. I'm not talking about college courses or what you see in tutorials, but what programmers use it for in real-world programs such as system, applications, etc. … | |
Re: [quote]How do i change the capital letter to smaller letter as above output example[/quote] use tolower() to convert a character to lower-case. It only works on one character, so if you want to convert a whole string to lower case you have to create a loop to iterate each character. … | |
Re: Here is how to test command-line arguments. Run this program from a cmd.exe command prompt to see how to get the arguments into the program [code] #include <iostream> using std::cout; int main(int argc, char* argv[]) { for(int i = 0; i < argc; i++) cout << argv[i] << "\n"; } … | |
Re: Welcome to DaniWeb. And your English is perfect :) | |
Re: >>Can you use C to connect to SQL??? If you mean an SQL server -- the answer is an astounding/resounding YES. There are billions of C/C++ programs (ok so that's a bit of a stretch) that have done that. Just google for ODBC to see how to do it. | |
Re: >>Why is it that the samples on the MSDN Learning center cannot be compiled Link please so we can check it out >>With Itanium as the active solution platform by default I don't have that option on my computer. Only win32. But I suppose you have to be running 64-bit … | |
Re: [QUOTE=mdew_47;665108]2. But the problem i am facing now is that the printf statement that i wrote in my demo C program is being output only in the Command prompt screen, not in the Text area which i have for the input and output to the C program. As we all … | |
Re: try flooding comstat with 0s before calling ClearCommError(). | |
Re: That function requires twol parameters [icode]CreateDirectory(_T("c:\\program files\\Testing", 0));[/icode] That worked for me on Vista Home. You most likely failed to correct the error(s) and warning(s) produced by your compiler. Always treat warnings like errors in your code because most of the time they are indeed errors. | |
Re: What compiler are you tring to compile it with? And what operating system (version too)? That 15-year-old program was more than likely written with a 16-bit compiler -- especially seeing that it uses old obsolete dos.h header file. What compiler errors? Or link errors? | |
Re: Microsoft Visual Studio 5.0 (and newer) Professional version also compiles for Mobile 5.0. But it costs about $800.00 USD. | |
Re: Did you use your compiler's debugger and setp through each line of the program? What was the value of hWnd (NULL or something else)? In WinProc() I think you need to add code for WM_CREATE. The Hello World program you compiled should have had one. | |
Re: [URL="http://www.google.com/search?hl=en&q=how+to+create+a+dll+in+c%2B%2B&btnG=Google+Search"]did you try google?[/URL] >>how do I pass a variable (named COM) from an app to the dll? The same way that you would pass it to any other function. | |
Re: That compiler does not support MFC. To get MFC you have to buy with your $$$ the standard or professional version. MFC and associated libraries are NOT free. | |
Re: >>how can a file be of negative size It can't. The problem is that your program contains one or more bugs. | |
Re: Since the name may or may not contain spaces you will have to 1) read the entire line into a character array. You can use fgets() to do that. 2) use a char pointer to advance from the beginning of the string to the beginning of the name. Copy all … | |
Re: One way to do it is to write your own malloc() and free() functions which keep track of the allocated pointers in a linked list. Then just before program exit run through the linked list to find the pointers that have not been freed. [code] struct node { unsigned int … | |
Re: After reading the number you need to flush the remainder of the line. Read [URL="http://www.daniweb.com/forums/thread90228.html"]this [/URL][b]Read Me[/b] thread to see how to do that. | |
Re: I almost never give out negative rep in technical forums because I don't want to destroy anyone's reputation. I do give it out occasionally in geek's lounge because it doesn't affect overall rep points there. The rep for mods works the same as anyone else's, and the last time I … | |
Re: people who say "pisses me off" in the subject title of threads :) Seriously: code tags thing is probably the #1 complaint. | |
Re: >>cin>>*per; As mention before, [b]per[/b] is a pointer that just points to some random memory location. and *per only references the first byte, not the entire string. Unless the purpose of this assignment is to learn character arrays and pointers, then you would be better off using std::string. | |
Re: >>if ((inputLetter >= 'A' || 'a') && (inputLetter <= 'Z' || 'z')) You can't use the || operator like that. Here is how you have to do that [icode]if ((inputLetter >= 'A' && inputLetter <= 'Z') || (inputLetter >='a' && inputLetter <='z'))[/icode] A better way is to convert the letter … |
The End.