2,839 Posted Topics
Re: [QUOTE=DimaYasny;868543] I was searching for an IDE that is capable of Python GUI drawing, much like MSVS can draw GUI windows without actually having to code them manually.[/QUOTE] You might want to take a look at [URL="http://boa-constructor.sourceforge.net/"]Boa-constructor[/URL], which works with wxPython. I haven't tried it yet, but it seems to … | |
Re: [QUOTE=FaNtEcH;868520] It's a pretty big program so i won't post the code here. If i post parts of the code, you guys won't understand it. Everything is inter connected. What should i do?[/QUOTE] How big is 'big'? We're not afraid of a bit code ;) Did you use functions and/or … | |
Re: I would use a function like [URL="http://www.cplusplus.com/reference/iostream/istream/getline/"]getline [/URL]to do the delimiting for me. I'd use a nested loop. The outer loop to read the file one line at a time (so delimit on the '\n') and one loop to delimit each line on a '|'. Now all I have to … | |
Re: [quote][code=cplusplus]void func(char*,int&);//A function returning no value and taking a char and reference to int as arguments.[/code][/quote] If you want a function that takes a char as an argument, you should declare it as [icode] void func(char, int&);[/icode] | |
Re: [QUOTE=CppBuilder2006;868748] All those colors were to convice you not to post such a naive answer! [/QUOTE] All these colors make me not want to help you. You're lucky I'm so bored that I'll actually give it a shot. Here you go: [B] Use namespaces. [/B] as ~s.o.s.~ would put it: … | |
Re: [QUOTE=Narue;868162]>Who knows, the judges may even give you the first prize. A magnificent F certificate. Ooh, I want in on that:[/QUOTE] I'm in too :) The OP said that this code could be in either C or C++, so I thought I'd make my brainvommit in c++ [code=cplusplus] #include <string> … | |
Re: [URL="http://www.codersource.net/cpp_tutorial_data_types.html"]Read this[/URL] and after that, perhaps [URL="http://www.cppreference.com/wiki/data_types"]this[/URL] In short: an [icode]int[/icode] is a whole number, without a comma (like 2). A [icode]float[/icode] will have a floating point (like 2.000) | |
Re: Something like [URL="http://www.daniweb.com/forums/search.php"]this?[/URL] | |
Re: If you [i]want[/i] to do it with the system() command, you could do something like: [code=cplusplus] int main(void) { string file; cout << "Enter name the file, TO THE EXACT WORD!!! eg. \"Hi.txt\" :\n"; getline(cin, file); string command = "copy " + file + " C:/Ok.txt"; system (command.c_str()); cin.get(); return … | |
Re: By not using 'P' again for the new person "john". Or remove this line [icode]*p = person("John");[/icode] if the two john's are one and the same person. You'll still have to use another variable name for "conner" though. What you're doing is actually something like this: [code=cplusplus] int a = … | |
Re: [QUOTE=riginos21;867299]hi my friend i have more problems to find the value of pi!!! can you help me???[/QUOTE] It's about 3,14159265358979323846 :icon_wink: | |
Re: How about using C++ style type-casting instead of C-style: [code=cpp] mVect intra_neighbor(static_cast<double>(vec_2d[row_num][col_num-1]), static_cast<double>(vec_2d[row_num-1][col_num-1]), static_cast<double>(vec_2d[row_num-1][col_num])); [/code] Or better: Modify your class to take ints as parameters instead of doubles. You're not doing anything with numbers behind the comma right? | |
Re: [URL="http://lmgtfy.com/?q=input+from+keyboard+c%2B%2B"]Here you go[/URL] | |
Re: You should probably start by choosing a programminglanguage to make it in. :icon_rolleyes: | |
Re: [QUOTE=WaltP;866000]I hope not. Seems to [I]Big Brotherish[/I] to me...[/QUOTE] You could always put 'invisible mode' on in your CP and no-one will know that you're here | |
| |
Re: (trying to) draw fractals in Python. Completely useless, but fun to do :) | |
Re: [QUOTE=Narue;863287] There are no exceptions, no double standards. It doesn't matter if you're the new guy on the block, an oldtimer with thousands of posts and a massive reputation, or a moderator. If you break the rules, you suffer the same consequences as everybody else.[/QUOTE] Which makes me curious: Did … | |
Re: [QUOTE=cscgal;859207]Link me to the page that's on.[/QUOTE] The address is in the attachment... But [URL="http://www.daniweb.com/forums/thread189757.html"]here [/URL]you go. Something is wrong with the code-tags. See [URL="http://www.daniweb.com/forums/thread189444.html"]this thread[/URL], which has been marked solved, but isn't. | |
Re: [QUOTE=_Nestor;864666]The probem is that you have to see seed the random generator with the srand function [/QUOTE] As you can see, the OP already did that in his/her code. @OP: [URL="http://eternallyconfuzzled.com/arts/jsw_art_rand.aspx"]Here's[/URL] a great page about using rand(), it will clear things up for you. | |
Re: I haven't got a clue. It's not C++, it's probably something from GTK. Where did you get the code from? [QUOTE=valtikz;864404]help help help[/QUOTE] Don't do that. It makes me very sad when people do that.:icon_frown: | |
Re: Here's a [URL="http://beej.us/guide/bgnet/"]link[/URL] to the only place on the web you'll need ;) | |
Re: [QUOTE=siddhant3s;864057] I don't understand you guys. You may be generous to the 'lazy' visitors of this website, I am not. [/quote] I'm not 'generous' to lazy posters. But I don't tell them to leave the website immediately.. I would point out to them, that giving homework is against daniweb rules … | |
Re: You should really watch the Fast and the Furious, then you would have known: [URL="http://www.holley.com/index.asp?division=NOS"]Nitrous Oxide Systems[/URL] | |
Re: Your structs are declared in main and are therefore out of scope in function.h. You could fix this defining the structs in function.h | |
Re: [QUOTE=Audette;863158] Can anyone tell me, is thespeed of execution of the final .exe file dependant on the compiler? e.g. will the speed change if I use Visual C++ 2008 Express Edition to compile my code? [/quote] Probably, yes. [QUOTE=Audette;863158] And if it does change, which will give a faster execution … | |
Re: [QUOTE=jbennet;863034]That is of course, IF we qualify to play the football in 2010, we didnt for the most recent Eurpean Cup...[/QUOTE] You're right. England has some great clubs, but they all consist out of foreign players. To be honest, I couldn't think of 11 [i]good[/i] English players (with all respect … | |
Re: This: [icode]while(!in_file.eof())[/icode] will cause your last line in the file to be read twice. And thus your loop will be executed 1 time too many and you get one row extra with the last read value. (in your case 6). | |
Re: Just put [icode]displayHeading();[/icode] inside the brackets [icode]{ }[/icode] from the if statement? [code=cplusplus] if (something){ displayHeading(); } [/code] | |
Re: I can't see your screen from here, so post some code to illustrate the problem. (line 287 for example) | |
Re: [QUOTE=booker;862475] Does anyone of you know how to protect this,[/QUOTE] With a gun? Or in case that is illegal in your country: a bat? [attach]10054[/attach] | |
Re: If this is a fictional project: -I would make a class book, with some attributes like ISBN, name, author etc. -Then make a class 'customer' with a name, adress etc -Then make a var in the bookclass to hold the customers ID or name. (the one that borrowed it. If … | |
Re: I have exactly the same problem with [code=cplusplus] //testing??? [/code] See! It doesn't work. I thought I was going crazy :) Edit: It got fixed after 2 minutes? What the hell is going on here? Edit2: If I edit my post and press 'save changes' the code-tags stop working until … | |
Re: [QUOTE=slim2hott;851437] i only have 1 error left to solve which is on line 631. it says the following: [CODE]ld returned 1 exit status [/CODE][/QUOTE] That's not the real error-message, it just what you linker says when it fails. The real error-message is probably a (few) line(s) before this one. [QUOTE=Bladtman242;852148]Remember … | |
Re: Why? You can get every character from a string with the .at() method: [code=cpp] string wordbank[]= {"yes", "no", "hello", "goodbye"}; cout << wordbank[0].at(0) << "-" << wordbank[0].at(1) << "-" << wordbank[0].at(2); [/code] output: [icode]y-e-s[/icode] | |
| |
Re: Try again. This time post your code between code tags ( [icode][noparse][code=cpp] // code goes here [/code][/noparse][/icode] ). And you might want to ask a question this time ;) | |
Re: That's looks like the horrible version of what Tux4life already posted... Read this (by clicking it) --> [attach]9994[/attach] | |
Re: [QUOTE=jephthah;857476]this is retarded. ... [/QUOTE] You're right, it's major overkill. [I]But[/I] it's the only answer in this thread remotely close to what the OP asked. @OP: If you really want to use a microphone (and you use windows) click [URL="http://www.techmind.org/wave/"]here[/URL]. Then just use the x-first bytes from the data you … | |
Re: How to use [URL="http://eternallyconfuzzled.com/arts/jsw_art_rand.aspx"]rand()[/URL] | |
Re: I don't have the exact numbers, but you're right. Daniweb has been a "bit" hard to reach lately. Yesterday it was down for an hour (for me anyway), round 15:00 gmt+1 | |
Re: Here's a nice [URL="http://www.daniweb.com/forums/thread67837.html"]thread [/URL]about it. It has a few C problems as well, but it could be a nice challenge to make them with OOP. | |
Re: I had a similar problem a year (or something) ago. How many subscriptions do you have? I had a 500-1000 and deleting most of them solved the problem for me, if I remember correct | |
| |
Re: [QUOTE=Dannyo329;853746]Why don't you just put the text file in your hard drive like D:\ or something? Then the program will work on every user on the computer.[/QUOTE] Because it is Linux, so D:\ won't exist ;) [QUOTE=valtikz;853732][code]myfile.open ("/home/ws14/Desktop/test.txt");[/code] for example: /home/ws14 is my user. but if I transfer the c++ … | |
Re: [QUOTE=snir;851966]only use " std::std::ofstream myfile; ", any problems with that?[/QUOTE] Yup. There's one [icode]std::[/icode] too many. | |
Re: [QUOTE=ithelp;852037]Build a vehicle monitoring software.[/QUOTE] So something like a car that's looking at a computerscreen? :) On topic: [search]Final year project[/search] | |
Re: press ctrl-f in one of your threads and type: Mark as Solved. It will show you link that is just above the (purple in this case) "quick reply to thread" bar. | |
Re: [QUOTE=Dannyo329;853740]Edited the code, try again,[/QUOTE] It will still fail. You are using P, but it's not initialized to anything. Also 'n' will start at element 1, not 0 Also '\0' is the termination-character for CHAR- arrays, not INT. @OP: You could initialize your entire array to -1 if you only … |
The End.