2,867 Posted Topics
Re: You didn't link with the DirectX 9 .lib files, did you? You have to setup your compiler to properly find and link the libraries. Generally you need to enter in libs such as d3dx9.lib, d3dinput9.lib, etc. into the "libraries to link with" text box in your "project settings". A good … | |
Re: Why is everyone complaining? I don't see why a bunch of boxes that change size would cause someone a headache... Then again, maybe it's just me. | |
Re: Actually the OP more-or-less did this. The algorithm does not work. Let's take what the program's output is supposed to do in this example: [code] User enters $4.63. Your output should be: The least number of coins required to make up $4.64 is 4. The coins needed are: 1 Twonie … | |
Re: Sweet video. Here's a [I]very[/I] cool video of a highschool boy playing the Pachenbell Canon on his rock guitar - but he plays it different than everyone else. At least in my opinion. [url]http://www.youtube.com/watch?v=p5ktV7w7ow0[/url] The Havingas are a very cool family, as they have their own family band where everyone … | |
Re: >I'm glad DaniWeb has high standards You can thank both Dani and Davey for that one. Davey did pretty much all the work, so I guess he deserves a lot of credit. But Dani actually initated the tutorial cleanup. :) | |
Re: Depends what you are trying to do with graphics. There isn't a standard way to do console graphics, although you can use the WinAPI to accomplish it if you choose. Here's a sinppet that accomplishes this: [url]http://www.daniweb.com/code/snippet173.html[/url] The other way of doing graphics is through a Windows GUI application, which … ![]() | |
Re: >airportSource.open(airportFileName); ifstream::open() expects a C-style string as a parameter, not a C++ string. To convert a C++ string into a C-style string, use the [inlinecode]c_str[/inlinecode] member function: [code=cplusplus]airportSource.open(airportFileName.c_str());[/code] | |
Re: A big THANK YOU for using code tags! You are one of the few newbies that actually read the rules and follow them from the first post. 2 things that caught my eye right away: Never include cpp files. Since they are implementation files, all that should be required is … | |
Re: >rectangle theRect2(); Be careful. [URL="http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.2"]This is not what you expect it to be[/URL]. Remove the parentheses, and the errors should go away. | |
Re: You can't initalize variables in the class definition. Try doing it in the constructor with an initialization list: [code=cplusplus] team() : playerName(5) {};[/code] | |
Re: Some of your critical boot files have been corrupted, which is why your Mac is unable to boot OS X. The best thing at this point would be to wipe the drive and reinstall Mac OS X. If you have critical files on there... well, there's a number of ways … | |
Re: ./configure is actually telling the computer to run a shell script that is contained in the current directory (which you just set by using [inlinecode]cd[/inlinecode]). If the terminal cannot find the command, perhaps you had better check to make sure it's there. Type the following at the prompt: [code] # … | |
Re: Agreed, Gnome is generally more appealing to Mac users than other window managers. If you really like Mac OS X, consider installing this theme after Gnome and Beryl are installed: [URL]http://gnome-look.org/content/show.php?content=50977[/URL] Enjoy ;) | |
Re: >lol i drink like 12 cups of tea per day That's actually pretty scary. I can't stand either of the substances myself -- coffee is far too bitter, and tea just tastes like hot water. :D | |
Re: Funny it even compiled. How in the world is the compiler supposed to know which statement is the evaluation statement, and which are assignment statements? Try changing the loop (eg. while() loop), and then it will work properly. By the way, placing an else() statement after the if() and then … | |
Re: >I am wondering what the voltage is in the USB ports? [URL="http://www.google.com/search?q=USB+voltage+specifications"]Hmm[/URL]? [quote=First Hit On Google] Low power bus powered functions draw all its power from the VBUS and cannot draw any more than one unit load. The USB specification defines a unit load as [B]100mA[/B]. Low power bus powered … | |
Re: Several problems in your code. 1. `gets` has no bounds-checking when it gets input, instead you should use `fgets` . 2. This code: `strcpy(word[nwords], tword);` This is copying an entire string into 1 character of the string. Use 2d array of chars if you want to have an array of … | |
Re: [quote=Ravalon;313919]I present myself differently, but my personality is basically the same. Easy going, quiet except when I think I can make a difference, and nice enough to keep from making enemies. ;)[/quote] Yep, and you've got the perfect avatar. Generally I don't get to talk all techie like I do … | |
Re: >The above simply casts the pointer returned by malloc to the memory allocated to a type char. A cast is not necessary. [URL]http://www.cprogramming.com/faq/cgi-bin/smartfaq.cgi?answer=1047673478&id=1043284351[/URL] [edit] Nevermind, stdlib.h was included, but you still don't have to as long as you're using standard C. However, it's important that you know why casting is … | |
Re: [quote=linux;325920]Or, you can write your own :)[/quote] That's the problem, most people have never taken law school and don't know the legal loopholes that may result from writing a custom licence. Probably the best thing to do if you can't find a licence that meets your needs is to modify … | |
Re: >I am using Devx. Compiler do you have any idea how i should link the files together? There's an "add source file to project" button or something similar to that (been quite a while since I used Dev). Once the CPP files are added, everything should work as expected. | |
Re: >He'd also have a quite different way of expressing himself. Something tells me that Einstein didn't write his Science notes in chatroom-speak... :D | |
Re: [URL]http://www.phim.unibe.ch/comp_doc/c_manual/C/FUNCTIONS/gets.html[/URL] [quote][B][inlinecode]gets[/inlinecode] does NOT check the size of the buffer and overflow on the stack can occour.[/B] Because of this, you should use [URL="http://www.phim.unibe.ch/comp_doc/c_manual/C/FUNCTIONS/fgets.html"]fgets[/URL] in preferance.[/quote] So... use fgets. Regarding your question: the link explains it, too: [quote][B]gets[/B] continues to read characters until NEWLINE or EOF is seen.[/quote] Basically you … | |
Re: >Screen won't clear I'm not entirely sure of the details, but it probably has something to do with the system call. Try using the WinAPI method described at the end of this article. [URL]http://www.cprogramming.com/faq/cgi-bin/smartfaq.cgi?answer=1031963460&id=1043284385[/URL] >I wan't it to be so that if a user enters invalid numbers, they recieve a … | |
Re: It depends on what you're trying to do. jbennet is right - you need codecs. However, many MP3 encoders come with codecs built right in, so you need to decide what you're trying to do. Basic encoders include[LIST] [*][URL="http://lame.sourceforge.net/index.php"]LAME[/URL] - very popular encoder, although development has halted, and is of … | |
Re: >so what do i need to use instead of the fflush(null); line?? It's fine to use [inlinecode]fflush(stdout)[/inlinecode] to clear the output buffer, however for input, you need to use better input techniques. [URL]http://www.daniweb.com/tutorials/tutorial45806.html[/URL] | |
Re: Does this answer your question? [url]http://today.java.net/pub/a/today/2005/07/07/j2me3.html?page=4#backgrounds[/url] In any case, Google is nearly always the answer. | |
Re: >but that did not work. You should describe exactly [I]how[/I] it did not work, so we can stop guessing and actually figure out what the problem is. >cout <<"Height :"<< getHeight()<<endl; How in the world is the compiler supposed to know which object to call [inlinecode]getHeight[/inlinecode] from? There's something special … | |
Re: Depends what you want to do. The best way in C++ to do this would be like this: [code=cplusplus] #include <iostream> #include <string> // useful for string manipulation std::string bname[] = { "Unix Environment", "Programming in Perl", "Comp. Architechture", "Operating System", "Java Programming", "DIstributed OS","Database Management", "J2ME","Operating Systems", "Algorithms in … | |
Re: Now THAT's a new one - G3 MacBook! :) Depends on how graphical and/or how speedy it has to be. Really graphical distros you could install on your Macs would be SuSE and Ubuntu. Something a bit faster would be Debian Linux - it runs on just about any machine, … | |
Re: > Help!! I'm a total Mac RETARD and don't have a clue what to do. You're not a retard. Macs aren't supposed to do that. Since you just bought your MacBook, the best thing to do right now is to get the CD drive replaced, as it's likely broken. Since … | |
Re: >great, now all i need to do is find out how to maintain a message board PM Dani for some tips :mrgreen: | |
Re: Yes, and it's not that surprising. In fact, the number of people that have more than 1 post is 20687 - a measly 18% of the registered. The fact is, it's really easy to register, however, it's much harder to take the time to write a post, especially if you've … | |
Re: We'd love to help you, but you must first read [URL="http://www.daniweb.com/techtalkforums/announcement8-2.html"]this[/URL]. Then post your latest attempt, encased within [URL="http://www.daniweb.com/techtalkforums/announcement8-3.html"]code tags[/URL] (and tell us what's not working so we don't have to guess). Thanks | |
Re: Glad to have you here. It's good to hear from students who say DaniWeb is helpful, as it shows what a valuable resource DaniWeb's becoming. | |
Re: [quote=torbecire;324239]Lets see whats makes me think that? Ah this 3 C:\Documents and Settings\Compaq_Owner\Desktop\New Folder (5)\linear.cpp In file included from C:\Documents and Settings\Compaq_Owner\Desktop\New Folder (5)\linear.cpp is what keeps getting displayed.[/quote] That doesn't tell us anything. There's errors displayed under that; these are simply describing the files that the errors occured. OK, … | |
Re: >But I wanted to find out which of the following had happened So then why not ask the question in the network troubleshooting forums? Because although it may have not been your end, I don't quite think DaniWeb is providing your internet connection... (...yet :twisted:) | |
Re: I didn't write this list with ease of installation in mind, but perhaps you will find this useful (most of the software is relatively easy to install, given that the majority of it is available from your distro's package manager). [URL]http://www.daniweb.com/techtalkforums/thread55115.html[/URL] | |
Re: Well, let me try to help if I can. First of all consider a class like this: [code=cplusplus] class myClass { private: int data; public: myClass() {}; ~myClass() {}; int getData() {return data;} void setData(int newData) {data=newData;} void calculateRoot(int amount) {data=sqrt(amount);} };[/code] An accessor method is used when another method … | |
Re: @Lazaro: Did you mistakenly post your reply to the wrong thread? ^_^ | |
Re: Regarding the compiler: why are you still using CodeWarrior? Apple's Xcode application is a free download, is of commercial quality, and provides roughly the same functionality (and more) of CodeWarrior. Also, I believe that using Xcode's Build & Run button actually invokes the application from the command line, eliminating the … | |
Re: I'm as clueless as you are. A google search came up with [URL="http://whyslopes.com/complex.html"]this[/URL], although "complex numbers" is highly subjective. Perhaps you should ask your professor for more details, because it isn't fair if you don't even know what the assignment is about... | |
Re: >THIS pointer will have the address of the recently created object No, [inlinecode]this[/inlinecode] pointer only has the address of the current object. >But why is that we must use THIS only inside a member function? Because otherwise it (compiler I guess) would have no way of knowing which object you're … | |
Re: Yes, this is normal C++ class/object behaviour. Part of this, in my opinion, may be due to the fact that in linked lists you often need to modify the object in the next node, or the one after that. This way, you can modify the values without having to traverse … | |
Re: Your second example is even worse because the object will go out of scope as soon as [INLINECODE]do_that_thing()[/INLINECODE] returns, so any usage of it [U]inside[/U] the try ... catch block will now be illegal. Back on topic: If you really need to use code outside the constructor, use pointers, although … | |
Re: You may want to check out t[URL="http://www.daniweb.com/techtalkforums/thread67837.html"]his thread[/URL] in the C/C++ forum -- although the problems are more directed to standard C than to specific OS programming, I'm sure it will teach you quite a fair bit simply by writing them. Also, consider expanding on these ideas if you want … | |
Re: [QUOTE=iamrobertkrogh;308816]So I have tried to figure this out myself by going to [url]http://www.ehow.com/how_6026_format-hard-drive.html[/url] The only problem is, when I right click on my C drive in the computer management window, I cannot click on "format" or "delete partition" They are in grey and I cannot click them. What do I … | |
Re: [URL="http://www.daniweb.com/techtalkforums/thread70096.html"]This[/URL] doesn't help you any? I admit I've never read it, but the favorite one around here seems to be [I]Accelerated C++[/I]. > Other post disregard Noones responded to it in the last [B][I][U][COLOR=purple]48[/COLOR][/U][/I][/B] hours! Wow... that is a looong time to wait. :rolleyes: |
The End.