15,300 Posted Topics
Re: >>First, sorry for my english, i am argentinian Your English is great -- no need to apologise for anything. Did you define HAVE_STDINT_H somewhere ? [code] #include <stdio.h> #include <stdlib.h> #ifndef HAVE_STDINT_H // if not already defined, then we'll define the symbol here #define HAVE_STDINT_H #endif #include <odbx.h> int main(void) … | |
Re: why don't you just use nested for-next loops? [code] int a = 0; int b = 0; char array1[10][10]; char array2[10][10]; for(a = 0; a < 10; ++a) { for( b = 0; b < 10; ++b) { array1[a][b] = array2[a][b]; } } [/code] or an even easier way to … | |
Re: You do what you want but I wouildn't be caught dead without antivirus running and scanning both the browsers as well as email. Allowing so much as even one virus can completly wipe out your computer and maybe steel your identity, costing you pleanty of money and time to fix. … | |
Re: Welcome crapodino. What is your native language (what language do you speak at home)? What are your intrests and hobbies. | |
Re: Welcome. I don't know the first thing about phthon but there are other experts here that will help you out, so ask away in the phthon board. | |
Re: fork() only for *nix operating systems, MS-Windows doesn't support it. | |
![]() | Re: Welcome to DaniWeb. >>What would be a good way to learn C++ online for free First, learn to read and research. This question has been asked thousands of times in the recent past. Start out by readig the [b]Read Me[/b] threads at the top of this forum -- you must … |
Re: >> cin>>"goldennumber"; remove the quotes. it should be like this: [icode] cin>>goldennumber;[/icode] | |
Re: create a loop to read each line into a std::string object, then call string's [b]find[/b] method to see if that line contains the string you want to find. | |
Re: you can use an iterator [code] list<int>::iterator it; for(it = mylist.begin(); it != mylist.end(); it++) { list<int>& sublist = *it; // blabla } [/code] | |
Re: give it all away to relatives and charity. I would hate to be filthy rich -- people who have lots of money have to work their tails off just to keep it. I'm perfectly happy with what I have now. | |
Re: There is no standard way to read it. You first have to determine the file format -- and that depends on what program created it. After you know the format then create a std::ifstream object to open and read it. There are literally millions of ways to read it, so … | |
Re: [QUOTE=cancer10;495636]well I was asking for MS (Microsoft SQL Server) alternate and not mysql[/QUOTE] mysql is an alternative to MS SQL Server. If you don't think so then what do you consider an [b]alternative[/b] ? Sybase also has SQL servers. but they are not free. | |
Re: As the poll shows, the USA is the greatest threat to Al-Quede's and Iran's idea of world peace. Nobody in the western world should want them to succeed at it, unless of course you want to treat women as dirt, stone them to death for disobedience. and ban them from … | |
Re: what is a "coed" calculator? Anything like coed dorms in college? | |
Re: do you know how to search a linked list by using the [b]next[/b] pointer? If you do, then its just call strcmp() on every loop iteration to find the desired node. Am I going to do this for you? Answer: No. | |
Re: [b]classname[/b] appears to be std::string object. c_str() returns a null-terminated pointer to the object's string. You should study up on std::string | |
Re: >>array[ct] = "\0"; That is incorrect. The quotes should be single quote, liks this: [icode]array[ct] = '\0';[/icode] >>What I'd like to know is how to clear a 2D array in the same way Yes, its done the same way. [code] char array[10][20]; for(int i = 0; i < 10; i++) … | |
Re: There are a few people here at DW who are still in grade school, and several more still in HS. I can forgive them for their ignorance because they don't know any better, although I still won't do their homework for them. Anyone who is HS graduate should know better … | |
Re: use threads. But I don't know if they are supported by your compiler. If not then next best thing is to call kbhit() (see conio.h) to see if a key has been hit. If it has, then call a function to process the keyboard data. If not then do the … | |
Re: Do the assignment one small step at a time. First create an array of the desired numbers. Get that compiled working first, then post the code you have done. | |
Re: each os is in its own partition. use a fdisk utility program to delete all those partitions. | |
Re: According to [b]Mastering Visual Basic 6[/b] you have to explicitly declare the array dimensions and arrays can not be initialized like that. You have to set each element one at a time. | |
Re: you want to work with arrays. First create an array of 5 integers [icode]int array[] = {1,2,3,4,5};[/icode] Now its simple. The middle three numbers are array[1], array[2], and array[3]. Next, to get the largest and smallest numbers, just create a loop and check each array element [code] int largest = … | |
Re: Yes -- buy XP Server and the number of desired licenses. | |
Re: Very creating resume that actually shows what he can do instead of just writing and bosting about it. It wouldn't supprise me if we don't see a lot of copy-cats now. Maybe he sould copyright his resume :) | |
Re: >>if (purchase<balance || purchase == balance) change that to this: [icode]if( purchase <= balance)[/icode] seekg() moves the file pointer xxx number of bytes. To accomplish this you have to calculate the offset from the beginning of the file, or from the current location of the file pointer. The start of … | |
Re: [icode] m_pMainWnd = &dlg;[/icode] <<< wrong [icode]m_pMainWnd = dlg.m_hWnd;[/icode] <<< correct assuming m_pMainWnd is type HWND. | |
Re: what operating system ? what version assembly language? what assembler? Essentually you have to open two files -- input file for input and result (output) file for output. In a loop, read a line from the input file, then write to the output file either the original file or the … | |
Re: Have you seen [URL="http://www.winprog.org/tutorial/dialogs.html"]this tutorial[/URL]? You should use the [b]BEGIN[/b] and [b]END[/b] tags, not the braces you posted. | |
Re: >>I'm a total newbie so I apologize for the stupid question Not a stupid question. That's a useful thing to know. This is c++ board -- so use std::string class and its [b]find[/b] and [b]substr[/b] methods to find the word "Giants" and replace it with the replacement string. You need … | |
Re: [code] class List { public: ~List(); // destructor }; [/code] | |
Re: Its [b]ifstream[/b] not instream. And if you have read a lot about it you need to try to write the program yourself then post what you have done if you have problems. | |
Re: you need an [b]ifstream[/b] object to open the text file, and a [b]string[/b] to receive the strings. Both of these are standard c++ classes in <fstream> and <string> header files. There are hundreds, if not thousands, of examples you can follow to write your program so I am not going … | |
Re: you can start by reading the [b]Read Me[/b] threads that have lots of suggestions. One thread is even devoted to c++ books. | |
Re: do it the same way as you would with cout to print to the console [icode]fout << "Hello World\n";[/icode]. The syntax is identical to cout. Then close the file [icode]fout.close();[/icode] before calling your showFile() function so that everything gets physically written to the disk. | |
Re: do you want to just rename the file? -- see standard [b]rename()[/b] function or copy its contents to another file similar to tye system copy or cp command ? You need two FILE pointers -- one to read the original file and the other to write what was read out … | |
Re: The code you posted won't (and can't) work. You need to put buttons on another window -- normally on dialog box but they can also be put on standard windows or toolbars. [URL="http://www.gamedev.net/community/forums/topic.asp?topic_id=387922"]Here[/URL] is a thread that may help you. | |
Re: >> I think face-sucking in public is offensive I agree -- a really long kiss in public is offensive, but short smack on the lips is not. And the standards of conduct among gays is (or should be) the same as straights. But what offends me the most is heavy … | |
Re: Nice imates. Its amazing (to me anyway) how much talent some people have. | |
Re: >>tHAT'S GOT it phalaris_trip! I kept putting my returns inside my definitions I guess you must be one of those people who have to be hit over the head with a brick before you understand what you read. Nurue and I told you that two hours ago in your other … | |
Re: Only make the class abstract (meaning with pure virtual functions) if there is a reason to do that. Don't create a pure virtual function just for the sake of making it an abscract class. There are thousands of base classes that do not contain pure virtual functions. | |
What to do with all those no-longer-needed programming books I no longer need and are just collecting dust ? Some of the books are 15+ years old while others are less than a year old. I could donate them to my local library. Maybe I could sell them on ebay? … | |
Re: Yes I think you could do it but it will be quite complicated because you have to write a lot of COM code manually. Search out some of [URL="http://www.amazon.com/s/ref=nb_ss_gw/104-1829136-6560743?url=search-alias%3Dstripbooks&field-keywords=ActiveX+Controls&x=11&y=19"]these books [/URL]to see what you can find. | |
Re: This won't solve your problem but min_payment() needs to be restructured so that there is only one return statement. No need for all those returns -- just put one at the end of the function. Same for min_payment() Actually, making the above changes did fix the problem. Here is the … | |
Re: There is no standard way to accomplish that. But there are at least a couple non-standard ways. (1) use kbhit() from conio.h -- but the problem here is that conio.h is non-standard and may not be supported by your compiler so we normally discourage its use. (2) create another thread … | |
Re: There is a free FTP client source code [URL="http://www.datareel.com/docs/classes/classes.htm"]here[/URL] (scroll down to Socket Class section) Just download (free) the whole library and you will have it with examples. | |
Re: Welcome to Daniweb and congratulations on your very first post :) Please go to [b]Coffee House[/b] and post in Community Introductions to tell us a little about yourself. To answer your question, start out by just writing a program that reads the words from a file. You can use <ifstream> … | |
Re: >>This action can be accomplished manually by simply bringing up a telnet window and typing in the appropriate commands When you bring up that telenet program doesn't it require you to log into the *nix box before you can do anything? Yes, then at that point there is a server … |
The End.