15,300 Posted Topics
Re: >> Now i would like this data save to a .txt file. Just use normal file i/o. If you wrote the code you posted then that should not be a problem for you. On the otherhand if you didn't write it then see fopen(), fprintf() and fclose() functions. | |
Re: [QUOTE=cscgal;467513] It means to wrap your code in [noparse][code] and [/code][/noparse] tags so they are easily readable. For example: [/QUOTE] Thanks for posting that -- I've been wondering how you posted that without using spaces between the brackets. Didn't know about the [b]noparse[/b] tags.:) | |
Re: Or Start --> All Programs --> Accessories --> Command Prompt To change the volume label: Windows Explorer, expand the [b]Computer[/b] folder, right-click on c:\, select [b]Properties[/b] then enter the name in the edit box. | |
Re: You have to learn GUI programming first, and that depends on the operating system and sometimes the compiler. | |
Re: >>I was told that the oapiGetFocusShipAirspeedVector(speedvec) initialized the speedvec Depends on how that function is prototyped, is the pointer being passed by value or by reference ? [icode]oapiGetFocusShipAirspeedVector(VECTOR3*)[/icode] or like this [icode]oapiGetFocusShipAirspeedVector(VECTOR3*&)[/icode] The compiler error leads me to believe it is passed by value. But I've also stumbled across times … | |
Re: [quote]NFL Commissioner Roger Goodell is determined to turn the sport into a global game and he will be encouraged by the crowd's enthusiastic response to their ground-breaking initiative.[/quote] I suspect the large turnout was because it was a novalty. American football in europe would probably be as popular as european … | |
Re: There is no reason why we can't ship nuclear wastes to the sun for safe destruction. Yes it will cost a lot, but probably cheaper than trying to safely store it here on earth for thousands of years. | |
Re: You can return a pointer to the allocated array [code] int* foo() { int* array = malloc( number_elements * sizeof(int) ); // do something with the array return array; } [/code] | |
Re: Ok I added the line numbers for you, which compiler are you using and what line number is it complaining about ? Probably line 6 as Salem mentioned? | |
Re: line 11: that works only at the time the line is executed. If you add new items to the front then you have to call begin() again in order to get pointer to the new front. | |
Re: [URL="http://www.google.com/search?hl=en&q=c+program+to+find+greatest+number+in+an+array"]Please learn to use google[/URL]. and you will sometimes get the answer to your question very quickly. | |
Re: When you click browse what folder is it looking in? Its probably not looking in the same folder where you saved the pictures. I save my pictures in <user account> --> Pictures folder, which is d:\Users\<User Account>\Pictures on my computer. | |
Re: In addition to the Windows SDK you need a resource editor and a resource compiler. You really don't need the resource editor if you want to create the resources manually, but the editor makes it a lot easier. You should be able to find some free ones on the net, … | |
Re: The only problem you had was you didn't code the code tags [ /code ] (but remove the spaces) | |
Re: >>how to get the full path of a file Promt the user for it. >>how to open in new windows Learn win32 api functions, like this tutorial[URL="http://www.winprog.org/tutorial/"]http://www.winprog.org/tutorial/[/URL]. You could also use a language with built-in support for Windows such as CLI and C# | |
Re: Did you run the [URL="http://www.microsoft.com/downloads/details.aspx?FamilyID=42b5ac83-c24f-4863-a389-3ffc194924f8&displaylang=en"]Windows Compatability Check program[/URL] ? If not then you should to see if you have incompatible hardware. | |
Re: sounds like bad memory chips. I'd take out the memory chips and let someone else test them on another computer. If its bad then you'll have to buy a new one. | |
Re: Its not all that hard to do, you should be able to do it yourself. msflexgrid has functions to get the text of any cell including labels. All you have to do is call that function just as the code you already have does for the rest of the grid. | |
Re: [URL="http://www.google.com/search?hl=en&q=quick+sort"]google for quick sort[/URL] and you will get your answer. But the [b]easiest[/b] to code is standard [b]qsort()[/b] method. | |
Re: line 25 and 26 should be combined like this [icode]while( infile >> a_word ) [/icode] | |
Re: you can reduce that to just one line like this:[icode]double qtrsSales[NUM_QTRS] = {0.0};[/icode] That will initialize all elments of the array to 0. | |
Re: [QUOTE=twomers;458946]Did she answer the question?[/QUOTE] No -- just a lot of gobbledeygook, just like our politicians. She would make a great politician! [quote="wikipedia"]The term was coined on March 30, 1944 by Maury Maverick, chairman of the United States Smaller War Plants Corporation. In a memo banning "gobbledygook language", he wrote … | |
Re: I assume you are not allowed to use standard C functions such as atoi() ? If you have to do your own thing then just subtract '0' from the digit and add the result to an int accumulator. For the second digit multiply the accumulator by 10 and repeat the … | |
Re: google will give you a lot of help, such as [URL="http://www.cs.mtu.edu/~shene/COURSES/cs201/NOTES/chap04/arms.html"]this one[/URL]. | |
Re: It Depends On The Operating System. (Please stop capatilizing every word -- its really really annoying.) | |
Re: a char is nothing more than a small one-byte integer. To convert a char to an int use the assignment [code] char c = 'A'; int n = c; [/code] Or if all you want to do is print the int value of the char, just typecast it [code] char … | |
Re: >>What do you mean? If you don't know by now you will probably never know :) Which is why I would never ever refer to a cat in mixed company using that word. I got in a lot of trouble while stationed at RAF Miltenhall during the 1970s. I was … | |
Re: >>How to use code tags? Look in the edit box. The instructions are in grey letters. All you have to do is read them. >>whata is complier? Too bad I can't issue an infraction for being such a dumbass. :) But I hope you were just teasing. lines 20-25 of … | |
Re: >>I was wondeing if somebody could comment them to help me understand them better. Comment it yourself and you will understand it even more. | |
Re: You can forget MFC because the Express version doesn't support it. You need the Standard or better version for that which costs $$$. It will support standard win32 api if you download the Windows SDK and following the setup instructions carefully -- its a pain in the a** but works … | |
Re: [QUOTE=jbennet;279771]whats mountain dew? when im working hard i have a red bull or something[/QUOTE] Its a soda that tasts like cow urin, or rather what I think cow urin would tast like if I tasted it. I dislike the stuff. As for Jones soda -- I never heard of it. | |
Re: >>but the problem is that same result is printed for any number The scanf() line needs a pointer to [b]n[/b]. | |
Re: The assignment is due [b]Tuesday[/b] Nov 8! I hate to inform you but Nov 8 is tomarrow, Thursday. In any event, you are just now starting that assignment ??? Do the program one small step at a time, and compile frequently so that you don't get overwhelmed with errors. First … | |
Re: it seg faluts probably because it doesn't compile. You can't declare an array like you did in main(). You have to allocate it dynamically, like this: [code] int main() { int n; int* array = 0; cout<<"Input the array size you want"<<endl; cin>>n; // allocate array size array = new … | |
Re: If the program knows the last number used, such as "06/11/07_1", then extract the digits beyond the underline, convert to int, increment the int, then reformat the number. | |
Re: Reads are normally done in another thread so that it can block while waiting for incoming data. If you don't do that then your program is highly likely to miss data. Follow the links in MSDN for CreateFile() and it will tell you how to read/write serial communications. | |
Re: line 6 is wrong [icode]scanf("%d", &s.age[i]);[/icode] And the sort algorithm needs some twinking. line 34: Its not necessary to check from 0 to current value of j because they are already in order. [icode]for(i=i+1;i<5;i++)[/icode] And the swaps should use j and i, not i and i+1. | |
Re: VC++ has excellent debugging capabilities. A little difficult to learn but because its so loaded with features. You can download a free version VC++ 2005 Express that is identiacal to the commercial version minus some features such as mfc support. But you can test-drive the compiler and debugger. | |
Re: DYNCALL is a macro that is expanded by your compiler. You will have to look in some *.h file where that macro is defined if you want to know exactly what it does. | |
Re: when you start to download something you should get a prompt for where you want to store it. The motherboard has nothing to do with this. >>Is there a way to transfer and also save all software downloads primarily to my C drive? Yes -- its called [b]drag & drop[/b]. … | |
Re: >>toupper(filename); Nope. toupper() only accepts a singlle character. There are no standard functions that converts the entire string, so you have to write that part youself. Put the below in a loop and you will have it. [inlinecode] filename[0] = toupper(filename[0]); [/inlinecode] >>gets(filename); Never ever use gets(). use fgets() instead … | |
Re: why don't you compile it and see for yourself what the answer is. | |
Re: what is the output of your program? The code looks ok, except I'd make [b]code[/b] an int instead of char but that shouldn't cause any problem. The format string needs a '\n' for line feed [icode]("%c, %d\n",[/icode] | |
Re: >>e.g it costs 90% to buy after 2 years, 80% to buy after 3 years etc... you mean the code will wear out ? :) why not charge 200% or 300% of actual cost? | |
Re: See line 32. You previously asked for the input filename but hardcoded it at line 32. Also check the file system to see that its in the current working directory (where the *.exe program runs). If not then you have to specify the full path on line 32. Finally, if … | |
Re: lines 85 thru 88: use a while loop [code] while( *dest++ = *src++ ) ; [/code] function printSentence at line 98: you have to save pointer [b]sent[/b] before executing lines 100 thru 102, then use the saved pointer in line 103 because as written that function is destroying the value … | |
Re: where did you declare and code [b]ListView_InsertGroup()[/b] ? It is not in any win32 api function that I know of so it has to be in your code someplace. |
The End.