15,300 Posted Topics

Member Avatar for Ancient Dragon

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

Member Avatar for Ancient Dragon
0
313
Member Avatar for nugget93

I'm closing this thread because what the op wants to do is not legal.

Member Avatar for Ancient Dragon
0
97
Member Avatar for darkagn

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 ?

Member Avatar for Jicky
0
254
Member Avatar for Srynx

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

Member Avatar for Srynx
0
136
Member Avatar for revenge2

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

Member Avatar for Ancient Dragon
0
130
Member Avatar for Butterflieq

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

Member Avatar for neosomosis
0
150
Member Avatar for The Dude

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 …

Member Avatar for MidiMagic
0
99
Member Avatar for jobs

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

Member Avatar for Ancient Dragon
0
105
Member Avatar for balla4eva33

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 …

Member Avatar for balla4eva33
0
163
Member Avatar for kv79

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

Member Avatar for kv79
0
183
Member Avatar for Serunson

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

Member Avatar for jbennet
0
332
Member Avatar for Nbkrooney

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.

Member Avatar for Lerner
0
165
Member Avatar for abhi_elementx

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.

Member Avatar for abhi_elementx
0
244
Member Avatar for tonyaim83

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

Member Avatar for dubeyprateek
0
105
Member Avatar for manster

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

Member Avatar for Nick Evan
0
945
Member Avatar for laila christin
Re: hi

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 …

Member Avatar for laila christin
0
99
Member Avatar for LilSniper
Member Avatar for stilllearning

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.

Member Avatar for ssharish2005
0
220
Member Avatar for jobs

>>What is the value at these lines? It is extracting the IP address out of the line that was read from server.conf file.

Member Avatar for ssharish2005
0
102
Member Avatar for ArrogantLegend

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.

Member Avatar for Ancient Dragon
0
91
Member Avatar for jrice528

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

Member Avatar for WaltP
0
137
Member Avatar for stokey

Put lines 10 thru 19 in another loop and break out of the loop if the user guessed right.

Member Avatar for stokey
0
103
Member Avatar for picklesandmayo

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 …

Member Avatar for picklesandmayo
0
100
Member Avatar for emilio
Re: sort

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

Member Avatar for Duoas
0
104
Member Avatar for Lardmeister

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

Member Avatar for jbennet
0
564
Member Avatar for GrimJack

>>I no longer have computer access at work What! you are supposed to be working. Come back soon :)

Member Avatar for Serunson
0
279
Member Avatar for satya.vijai
Member Avatar for Ancient Dragon

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 …

Member Avatar for nav33n
0
545
Member Avatar for peeta

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 …

Member Avatar for darkagn
0
89
Member Avatar for web_master

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)

Member Avatar for Ancient Dragon
-1
120
Member Avatar for tootypegs

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]

Member Avatar for Ancient Dragon
0
43
Member Avatar for Cyb3rAssasin

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 …

Member Avatar for Cyb3rAssasin
0
96
Member Avatar for alcoheca

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 …

Member Avatar for alcoheca
0
804
Member Avatar for kv79

You probably need to read [URL="http://msdn2.microsoft.com/en-us/library/aa380599.aspx"]this[/URL]

Member Avatar for kv79
0
91
Member Avatar for stevex

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

Member Avatar for Ancient Dragon
0
166
Member Avatar for kv79

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 …

Member Avatar for kv79
0
189
Member Avatar for djsingh6000

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

Member Avatar for Salem
0
87
Member Avatar for sikky_deep

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.

Member Avatar for sikky_deep
0
2K
Member Avatar for vmanes

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 …

Member Avatar for Ancient Dragon
0
119
Member Avatar for Jicky
Member Avatar for Ensabahnur

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 …

Member Avatar for Ensabahnur
0
219
Member Avatar for sneekula

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.

Member Avatar for sneekula
0
226
Member Avatar for emilio

I just compiled it ok, but I put [b]printAllStrings()[/b] at the top of the file before [b]main()[/b]

Member Avatar for emilio
0
83
Member Avatar for eranga262154

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 …

Member Avatar for eranga262154
0
195
Member Avatar for eranga262154

[code] CString mystring = _TEXT("Hello World"); string astring = (LPCTSTR)mystring; // assuming UNICODE is NOT defined or string astring = mystring.GetBuffer(0); [/code]

Member Avatar for eranga262154
0
273
Member Avatar for Max_Payne

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 …

Member Avatar for Ancient Dragon
0
92
Member Avatar for Cyb3rAssasin
Member Avatar for balla4eva33

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

Member Avatar for balla4eva33
0
223
Member Avatar for EuMesmo

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

Member Avatar for EuMesmo
0
202
Member Avatar for #include<DAN.h>

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.

Member Avatar for Salem
0
3K

The End.