15,300 Posted Topics
Its pretty rare for me to post questions here but I came across this one about qsort I can't answer. If I try to sort an array of character strings such as [icode]char array[255][20][/icode] qsort works ok as expected. But if I declare the array like this qsort fails: [icode]char*array[255][/icode] … | |
Re: I'm closing this thread because what the op wants to do is not legal. | |
Re: I agree PacMan, Donkey Kong, Super Mario Brothers, Doom and Diablo were probably the most influential to the gaming industry. Most of the others were probably very good games but did they have all that much influence on the way gamers wrote games in the future ? | |
Re: >>Microsoft Visual Studio 6.0 That's your first mistake. Unless you are required to use that compiler by your school you should scrap that compiler because of its age and known NON-compilance with c++ standards. You can get a pretty good free VC++ 2005 Express compiler that will let you code … | |
Re: >>_getch_getch This is a C++ program, not C. So don't use that C function. Use cin.ignore() or cin.get() so that you don't mix C and C++ in the same program. Sure of course getch() works, but its not consistent and you might get lower marks from your instructor for using … | |
Re: I don't know what language that was written in -- it looks a little like cobol, but in any event you will have to translate that into c++. Shouldn't be very difficult -- just add the code between start and stop in main() then create functions for all the others. … | |
Re: According to [URL="http://encarta.msn.com/encyclopedia_761572562/Island.html"]this[/URL] Austrilia is a continent. If the only geographical difference between a continent and and island is size, then why is Austrilia considered a continent and Greenland (2,175,600 sq km/840,000 sq mi) an island. Why isn't Greeland also a continent ? Or why isn't Austrilia an island? The … | |
Re: >>doesn't all OS have some kind of clock Most do, but some embedded systems do not, for example the computers in your car do not have a clock (except, of course, the clock you see). A few years ago when we were all busy making Y2K adjustments to our programs … | |
Re: just declare another pointer to be the same as the original and increment it until it reaches the end of the string. Along the way count the number of commas etc. You could use the original pointer but its better not to so that you don't destroy the address of … | |
Re: Are you writing a windows GUI program? If yes, then you put all those numbers in resource.h file. >And where i can find all of this? The resource.h file in your programs project folder | |
Re: [QUOTE=Serunson;480205]The provisional license costs £45 ($90 ish) then when you pass it is upgraded to a full license free of charge.[/QUOTE] I think its about $20 USD here and kids can get a license at age 16. But its restricted -- must have an adult in the front seat unless … | |
Re: line 26: eof() doesn't work like that. Use this instead [code] while( inFile >> name >> points >> description ) { // blabla } [/code] But that assumes each line contains exactly three words with no embedded spaces. For example it won't read a [b]name[/b] such as "John Smith" correctly. | |
Re: std::sort only works with arrays such as a vector. If you want to use a structure then great, but you need an array of structures. | |
Re: >>What can be the reason for this.. Without seeing the program's code we have not idea. The problem could be either in your program of the DLL that you wrote. | |
Re: >>declaration of `count' shadows a parameter You created a variable that has the same name as one of the parameters to that function. Change one of those names to something else. >>member `contacts' is a private member of class `PIM' Private members of a class can only be accessed by … | |
Re: For the first problem try turning off some new Vista account security controls. Select Start --> Control Panel --> User Accounts --> Turn User Account Control on or off The second problem, yes Vista takes control of that on/off button so that if you try to turn it off Vista … | |
Re: my guess is they are only supported on *nix and POSIX. Microsoft compilers have very little POSIX support. Even [URL="http://www.gnu.org/software/gnulib/manual/html_node/monetary_002eh.html"]GNU doesn't seem to support it [/URL]across all platforms of its compilers. I have the most recent version of Dev-C++ and monetary.h is not supported there either. | |
Re: >>What is the value at these lines? It is extracting the IP address out of the line that was read from server.conf file. | |
Re: How to read from the file depends on how the file was writte. Post a few lines so we can see what it looks like. | |
Re: >>Edit: made a smiley out of my parenthesis :O That happens a lot. If you scroll down the page you will see a checkbox to disable smilies in text. You may have to click the [b]Go Advanced[/b] button to see that checkbox. | |
Re: Put lines 10 thru 19 in another loop and break out of the loop if the user guessed right. | |
Re: you will need to store the pointers that are returned by strtok() in an array of pointers so that the words can be sorted by qsort. [code] char* array[255] = {0}; // assume max of 255 pointers ... int c = 0; // arrays start at index 0, not 1 … | |
Re: >>what is the best way to sort all strings in arrPP Declare them all in one big array and in sorted order then you won't have to worry about that. | |
Re: >>Is it also getting shorter? Yes -- the older you get the sorter your memory :) >>Are hard-drives doomed? Probably, but not in the near future. They need to replace with something for long-time storage. | |
Re: >>I no longer have computer access at work What! you are supposed to be working. Come back soon :) | |
A comment in another thread here got me to looking for something like this. How would the world change if we USA we no longer considered the most powerful nation? How would your life change ? Below is some speculation, or sci-fi if you will. from [URL="http://ezinearticles.com/?What-If-The-Most-Powerful-Nation-On-Earth-Was-Iran?&id=310845"]here[/URL] Is everybody happy … | |
Re: Welcome to DaniWeb Peeta. You can use almost any compiler that is targeted for your operating system. For example you can not use a compiler for MS-Windows on a MAC and vice versa. [URL="http://www.thefreecountry.com/compilers/cpp.shtml"]Here[/URL] is one place to look for free compilers. Try to make [URL="http://www.google.com/search?hl=en&q=c%2B%2B+compilers+for+mac"]google one of your best … | |
Re: Try reading the [b]Read Me[/b] threads at the beginning of this board. And stop using all caps because its considered very rude to shout at us. >>and it still showed quite some errors Can't help you if you don't post the exact error message(s) | |
Re: what is a [b]firewire[/b]? do you mean [b]firewall[/b]? [edit] Oh nevermind, I should take my own advice and [URL="http://en.wikipedia.org/wiki/FireWire"]google[/URL] what I don't know [/edit] | |
Re: you don't have to do line 16 and 17. [b]GetConsoleWindow()[/b] will return the HWND handle of the console program. line 20: getch is not such a good idea in this program because there is no way for the program to terminate unless the user KNOWS that it is looking for … | |
Re: line 1: >>INPUT_RECORD fillBuff(std::string value) { That should be returning a pointer, not a single element of an array line 42 of main(): >> records = &fillBuff(value); and that probably doesn't really work the way you think it does either. line 23: >> return irec[0]; You can't return an object … | |
Re: You probably need to read [URL="http://msdn2.microsoft.com/en-us/library/aa380599.aspx"]this[/URL] | |
Re: Probably referring to [URL="http://www.daniweb.com/forums/post419652.html#post419652"]this post[/URL] which just seems to be very similar. But got to admit that stevex is pretty darned long winded :) | |
Re: First, create a new project [b]File --> New --> Project[/b] After that, copy the files from the project you posted into the Dev-C++ project you just created then add those files to the project. In the [b]Project[/b] tab on the left side of the screen expand the [b]Project1[/b] folder (assuming … | |
Re: >>COULD Ne1 help m eout Huh??? is that Chinese or Japanese you are writing. Please write English. >>converting it to binary converting what to binary? Your program? All you have to do is use a compiler and compile it. The compiler will create the *.exe file (well, technically its the … | |
Re: I think you would get quicker and probably better advice from [URL="http://forums.oracle.com/forums/categoryHome.jspa?categoryID=84"]Oracle's forum boards[/URL] that specialize in Pro*C SQL language. | |
Re: From what I understand all versions use the same compiler and IDE -- the difference between versions is the add-ons that are packaged with it. I know that the Pro version is equipped with MFC and cross compilers for various embedded Mobile 5.0 operating systems. But its highly unlikely first … | |
| |
Re: why don't you just use [b]getline()[/b] to input the sentence instead of that more complicated use of [b]get()[/b]. [code] cin.getline(sentence,sizeof(sentence)); letters = strlen(sentence); [/code] Now you will probably have to use a structure of letter number and frequency so that you can sort the structures by frequency while maintaining the … | |
Re: ballets should have the option "None of the above". And if that gets the majority of votes then a new election must be called within a year and all candidates on the previous ballet are ineligible for the new election. | |
Re: I just compiled it ok, but I put [b]printAllStrings()[/b] at the top of the file before [b]main()[/b] | |
Re: DLLs are much like normal static libraries. Create a header file with the dll functions you have exported and include it in your console project, then add the .lib file that the compiler created for the dll in the console project just like you would any other project. I use … | |
Re: [code] CString mystring = _TEXT("Hello World"); string astring = (LPCTSTR)mystring; // assuming UNICODE is NOT defined or string astring = mystring.GetBuffer(0); [/code] | |
Re: If you use static the value of [b]i[/b] will be the same for all instances of the class and there will be no way to reset it back to 0 if you need to. I think a better solution is to use a different variable name and make it a … | |
Re: >>I'm sure it's what I need but I don't really understand how strstr works Very simple -- it searches through the string in the first parameter for the first occurrence of the string in the second parameter. If the first string contains the second string then strstr() will return a … | |
Re: >>If some one can do this please post the code, I'd be trully grateful. I'm sure you would be grateful, but doing yourself disservice by not doing it yourself. We will NOT do your homework for you. Post the code that you can do and ask questions about what you … | |
Re: list of of the executables in c:\windows directory, all of its sub directories and everywhere else on your computer's hard drive. That's how many things can be run with the system function. There are litterally thousands of them, so attempting to post them here is pointless. |
The End.