2,839 Posted Topics
Re: I think it would be a great idea, but there's isn't much expertise present on Daniweb on this subject. But on the other hand, you have to start somewhere, right? | |
Re: Without looking through all your code, I see this thing:[code] else recv_data[bytes_recd] = '\0' ; [COLOR="red"]{[/COLOR] infile.getline(input,255, '\n'); while(!infile.eof()) [/code] What is that brace doing there? That code block will [I]always[/I] be executed, because the {}-block isn't part of any if/else/while/for block. | |
Re: .remove doesn't take 0 parameters, it needs to know [i]what[/i] it has to remove. So in your case you need to tell it which flight you want to remove. You can do this in two ways: create a temp variable of type 'flight' and give it the number and cap … | |
Re: Yes it is, but you're on the wrong forum here. Just google for 'English singers' or sign up for mySpace, that's the place all musicians hang out. You should be able to find someone rather quick. Good luck! | |
Re: A good idea is to [URL="http://www.cplusplus.com/doc/tutorial/classes.html"]learn about Classes [/URL]before you start coding anything. Then you can draw (on paper) what your class should look like. What memberfunctions, what variables. Which part should be private, which public? If you answer these questions, you'll have your header-file (.h) almost complete. | |
Re: [URL="http://www.google.nl/search?hl=nl&q=win+api+tutorial&btnG=Google+zoeken&meta="]This [/URL]would be a good start | |
Re: You're using Points_1 everywhere (even in [ICODE]switch(LetterGrade_2)[/ICODE] ) So you might want to assign a value to Points_2 at some point in your program :) Now you're just overwriting the points value from your first switch in your second switch | |
Re: [QUOTE=verruckt24;802755]I fail to understand the point of this post. The OP isn't returning back here. This fact was underlined way earlier which was second sited by me to obj7777 in my previous post, yet you are adding to it. Also you aren't even mentioning anything that hasn't already been mentioned … | |
Re: Have a look at the [URL="http://www.google.nl/search?hl=nl&q=site%3Adaniweb.com+%22project+topic%22+&btnG=Google+zoeken&meta="]gazillion other threads on Daniweb[/URL] about this *[URL="http://www.catb.org/~esr/faqs/smart-questions.html#urgent"]urgent[/URL]* | |
Re: [QUOTE=Ancient Dragon;800291] but I don't recall its name.[/QUOTE] That would be MSBuild Always MS-something when it's microsoft, just as it's always mc-something with mc-donalds ;) | |
Re: [QUOTE=WaltP;800119]I hope you get a good grade on the assignment, [B]Comatose[/B][/QUOTE] The poster had the assignment 90% finished, so that's showing some effort right? Comatose wasn't doing anything wrong by showing the poster how to code the last few percent IMO. You could argue that Comatose didn't explain what he … | |
Re: [QUOTE=maydhyam;629031] It would be greatly appreciated if you can simply follow the thread.[/QUOTE] Yeah, we would all like that, but that hope is long gone... If you have an hour to spare: [URL="http://www.daniweb.com/forums/search3711937.html"]click[/URL] :-/ | |
Re: There are a few thing wrong with your code : - you're incrementing 'i' twice in your word_count function. That's not good. You're missing characters because of this and you'll probably run out of array-bounds. - this: [icode]printf("\nThere are %d words.", word_count)[/icode] should not be inside that loop. It'll get … | |
Re: [QUOTE=serkan sendur;796175] 2) What is the number of total members in DaniWeb. [/QUOTE] at this moment 357425 ([URL="http://www.daniweb.com/forums/memberlist.php"]here[/URL]'s a list of them) | |
Re: An by downloading for free, you mean illegal download? No, I don't have any idea where to do that and if I had, I wouldn't tell you :) My advice would be to go to a bookstore. [QUOTE=acardiac;795549] Datz so sad yar......! [/QUOTE] Are you a [URL="http://www.daniweb.com/forums/post696561.html"]pirate[/URL]? | |
Re: [QUOTE=marco93;795822]This has no sense. Drawing must be done in WM_PAINT Console are not for drawing[/QUOTE] Why not? If it's possible? Try thinking outside the box :) To be honest, I can't think of any uses right now, but if were to make a console-based hangman game or something in that … | |
Re: I'd like to follow up on Chris' post: [icode]std::ofstream outfile("data.txt", std::ios::in);[/icode] I would personally go for [icode]std::ofstream outfile("data.txt", [COLOR="red"]std::ios::out[/COLOR]);[/icode] But more important: One of your next steps should be to check is the file did indeed open or not. If the open command fails (and it will if the file … | |
Re: Try [URL="http://www.lmgtfy.com/?q=using+sql+in+c%2B%2B+tutorial"]this [/URL]link | |
Re: 1. There are additional functions in the library file. That's why you'll have to link to it. The header file (.h) tells the compiler [i]which[/i] functions are in the library you're linking to. 2. You're using functions that the linker can't find 3. What do you mean? | |
Re: I put on my wizard-hat and robe.. err, I mean: I have a look in my crystal ball and see: Post the code that isn't working | |
Re: It's kind of hard to explain the entire assignment to you. Tell us which parts you don't get. For example do you know [URL="http://www.cplusplus.com/doc/tutorial/classes.html"]how to use classes[/URL]? If yes: start by making the 'skeleton' of the program. (constructors/destructor/prototypes etc) Do you know the difference between signed and unsigned? Do you … | |
Re: Did you check these things? [quote=msdn]Possible reasons for this error: * Low system resources. Close some applications to resolve this. * Insufficient security privileges. Verify that you have sufficient security privileges. * The executable paths specified in VC++ Directories do not include the path for the tool that you are … | |
Re: Jencas is trying to tell you that this particulair piece of code [i]is[/i] infact working. It returns 0 which indicates [b]succes![/b] If you have any problems, you should post the rest of the code to. And this time post your code between code tags: [noparse][code=cplusplus] // code here [/code][/noparse] [edit] … | |
Re: if the file "Dic.dat" is in the same directory as your source-files, your program should work fine. Are you sure that you didn't make a typo? | |
Re: Or without classes: [code=cplusplus] int Count(std::string in) { int how_many = 0; for (unsigned i = 0; i<in.length(); i++) if (in[i] == 'l' || in[i] == 'L') how_many++; return how_many; } int main() { std::cout << Count("What the helL is that?! Lol"); }[/code] | |
Re: [QUOTE=pywriter;790870] And are you sure you are using [B]Visual Basic[/B]? And thanks[/QUOTE] Ofcourse not, this is C++ code :-O | |
Re: When I started network programming, [URL="http://beej.us/guide/bgnet/"]Beej's guide[/URL] helped me alot | |
Re: Comatose is right. Vectors are a no-no And your code won't compile, we discussed it in [URL="http://www.daniweb.com/forums/thread173103.html"]this [/URL]thread | |
Re: Well you [i]could[/i] do it like this: [icode]Foo* f[2] = {new Foo("Hello"), new Foo("Hello")};[/icode] but you'll have to delete them manually 1 item at a time: [code=cplusplus] delete f[0]; delete f[1]; [/code] :S | |
Re: [QUOTE=Liszt;795110] For example why will not all 10 emails be sent in only 1 second ? [/QUOTE] Why would you want to do that anyway? Smells like an email-bomb to me, and that would be against the rules.... :icon_wink: | |
Re: I don't understand your problem? Can you post the code here (not as attachment) using [noparse][code=cplusplus] //code here [/code][/noparse] and specify where your problem is? | |
Re: As far as I know (and I'll probably be corrected by Narue, Salem or ArkM), if you want to use function-pointers to member functions inside a class, that function has to be static. Also your call is wrong :[ICODE] result = multipleby4(xSquared);[/ICODE] should be[ICODE] result = multipleby4(&Int::xSquared);[/ICODE] So then your … | |
Re: Or do you want something like 'wine' for MAC? Maybe [URL="http://www.codeweavers.com/products/cxmac/"]this[/URL] is something for you then | |
Re: [QUOTE=jladd5;794772]I really don't even know where to start to be honest. [/QUOTE] So you have a file with x lines in them, and you know that the last line will be a '-1', you could use the getline() command to get one line at a time. For example: [code=cplusplus] #include … | |
Re: Even when 'found' is an int, that code would be just fine | |
Re: Here's an excellent explanation on[URL="http://eternallyconfuzzled.com/arts/jsw_art_rand.aspx"] how to use rand()[/URL] And [URL="http://www.gidnetwork.com/b-66.html"]here's[/URL] another useful link about main()/void main()/int main() | |
Re: [QUOTE=mruane;793775]Thanks guys. I will try to get c++ for dummies.[/QUOTE] I'm not really a big fan of the ' blabla for dummies' series. [URL="http://www.daniweb.com/forums/thread70096.html"]Here's [/URL]a thread with a lot of good book recommendations in it | |
Re: [QUOTE=Comatose;793864] I'm not sure if you can just toss a c_str() on your iter1 or not.... I doubt it.[/QUOTE] You're right, that's not possible. [QUOTE=abuthalip;793789] By using cout, i am able to get the result but i need to get it with printf. Is it possible? [/QUOTE] The horrible hack … | |
Re: [QUOTE=Ancient Dragon;791045]what computer language? Or can you use anything you wish?[/QUOTE] I think c++: [QUOTE=abby2589;790997] I'm not good in c++,[/QUOTE] But this could also mean that anything [i]but[/i] C++ would do... hmm... | |
Re: In the code you posted "in" should be an istream. Since your taking in input from the keyboard, you can just replace it with "cin" [I]but[/I] the code you posted isn't really a 'pause' function. It's a function to flush the stream so that you can (for example) pause your … | |
Re: [URL="http://eternallyconfuzzled.com/arts/jsw_art_rand.aspx"]Here's[/URL] some documentation on rand() and srand(), it should help you get started | |
Re: Also, if you're using std::strings for a filename you'll have to convert them to const char* for ifstream. The c_str() function will do that for you: [code=cplusplus] std::string filename = "my_file.txt"; std::ifstream infile(filename.c_str()); [/code] | |
Re: There's a typo in your code. I think you mean [icode]Environment::DEFAULT[/icode] instead of [icode]Environment:EFAULT[/icode]. I never heard of the second anyway ;) | |
Re: I see that you already include <sstream>. So do you know how stringstreams work? If yes: That's one way of doing it. - take input in a string - create a stringstream and load the inputstring in it - use the >> operator to extract one word from the stringstream. … | |
Re: [QUOTE=MosaicFuneral;791140]I don't trust executables.[/QUOTE] Then how the hell do you run any programs on your computer? :icon_rolleyes: | |
Re: How about [URL="http://www.netlib.org/lapack/lug/node14.html"]this[/URL]? And here are the [URL="http://www.netlib.org/lapack/archives/"]pre-compiled libraries[/URL] for your windows machine. I never used dev, but you'll have to add these to your linker somewhere in projectoptions [QUOTE=smstry;790963] it is urgent [/QUOTE] You shouldn't have wasted your time "searching for a month" then :) | |
Re: How much do you know? Do you know how to take user input? Do you know how to use functions? The switch statement should also proof useful for your case. Here's a [URL="http://www.codingmagic.com/CPPTutorials/CPPTutorial04.html"]small example [/URL]that you can modify to your own needs. It's in C, but it gives a nice … |
The End.