2,867 Posted Topics
Re: They use massive amounts of C, assembly, and often C++. Nothing fancy like .NET. ;) If you're thinking about creating one... nah. Or at least spend a few years learning C before attempting it, and bring a whole crew of programmers with you when you do start. | |
Re: [quote=degamer106;314890]This might seem like a silly question, but how do I read in a newline char, by itself, as input? For example, if I gave the user a choice to enter a string for a new filename, or let them just press ENTER for some other choice. forgot to add … | |
Re: I believe that you have to free each individual member of an object first (assuming of course, that the object contains data members that were dynamically allocated), [I]before[/I] you can delete the actual object itself. That's what the object's destructor is for; so use it wisely. If the actual object … | |
Re: I'm not entirely sure what the problem is, but something doesn't good in your code when you're mixing the getline() statements and in >> operators... You see, when you use [inlinecode]istream >> a_variable[/inlinecode], it always leaves a trailing newline in the input stream. Then when you try to use getline(), … | |
Re: [quote=Sturm;314846]I checked the hp website supposdly I have a SATA hardrive not an ATA one. But whatever...[/quote] That's your problem. Many older Linux distributions (i.e. v2.4 kernels) still don't have kernel support for the newer SATA hard drives, and thus cannot recognize it. I had similar problems trying to run … | |
Re: Upgrading will cost too much for what you want to do with your computer. Even the cheap-ish computer is kinda low on RAM, so it's not going to be quite ideal for your needs either. You'll want [I]at least[/I] 512 MB - 1 GB to be ideal. The Sempron 2800+ … | |
Re: [quote=beastpopo;314852]Hi, I recently bought a used powerbook. It works but the only thing is it has the system under what I assume is the original users name so I cannot tweak the email or go into the system to change anything. My question is this, can I reset the whole … | |
Re: Something tells me you're missing a = here: [code] if(reEnter [COLOR=Red]=[/COLOR] true) { binToDec(); }[/code] Also, when you know that the number isn't true, you break out of the loop before the statement I just showed gets executed. Which brings up another point: why are you using recursion for a … | |
Re: Usually, you need a static library (.lib) for any DLLs you use in your program. Anyways, I don't know Borland, but here are the general steps for setting up a compiler to use an external library:[LIST=1] [*]Get a hold of the necessary files to use the library. [*]Configure the compiler's … | |
Re: What he said. ^_^ However, if you [I]are[/I] feeling adventerous this guide might be an aid to you: [URL]http://www.ipodbattery.com/slimipodinstall.htm[/URL] | |
Re: Hmm.. I'm slighty confused, but perhaps you're thinking of a static member? It would sorta work like this: [code] class CShip { public: // .... static int maxCargo; }; [/code] Then for each class you can set this variable, and it will remain the same throughout all instances of the … | |
Re: Hmm... perhaps you want to overload the behaviour of [inlinecode]<<[/inlinecode]? I'd say create a base class [inlinecode][B]CFileWrite[/B][/inlinecode] which implements member functions which print to a file and to the screen. Then perhaps for each sensor object you overload the << operator to your needs. [code] class CFileWrite { protected: void … | |
Re: > Please help me out on this. Sure, but you have to show us you're trying. Post your best attempt at it, tell us where you're stuck/having problems, and [URL="http://www.daniweb.com/techtalkforums/announcement8-3.html"]USE CODE TAGS[/URL]. [URL]http://www.daniweb.com/techtalkforums/announcement8-2.html[/URL] | |
Re: Don't flood the forums. [URL]http://www.daniweb.com/techtalkforums/post313044.html[/URL] Perhaps it might be a better idea to ask on a specialized Mac forum, such as Apple's forums? | |
Re: [quote=blackjack;314344]Basically, I need to step through any array using pointers instead of the array indices. I changed my char* ptr to const char* ptr and it does work. Thanks.[/quote] But why would having a second [inlinecode]const char*[/inlinecode] copy do you any good? Neither pointer can you modify, so copying it … | |
Re: NTFS and Fat32 are just different types of partitions. Your main hard drive is using the more modern filesystem NTFS, while the hard drive you just installed uses the older type Fat32. It doesn't really matter much, although NTFS is supposedly faster and safer than FAT. If you care, you … | |
Re: It's a joke. No normal person would do something that dumb for real. | |
Re: [quote=Matt Tacular;314040]How do I do that? I'm very new to c++.[/quote] I would assume it would be something like: [code]char x[] = "10110101"; if (x[4] == /* whatever here */) { } // convert number to to decimal here // ... [/code] | |
Re: >Can anyone right a C++ program that does this? No. Show us your best attempt, and we'd be happy to help you fix the problems and answer your questions. [url]http://www.daniweb.com/techtalkforums/announcement8-2.html[/url] | |
Re: I just about killed myself laughing at the irony of this "dimming". Typicial - the scientists have already identified the problem, the cause, and the solution, plus they say that we've already solved it. What really ticks me off is when they blame us North Americans (meaning U.S.) for all … | |
Re: Depends what you want to do with them. Since they're seperated by spaces, you could simply read them directly from the stream into the variable like this: [code] float floatAmount; while (absoluteval >> floatAmount) { cout << floatAmount << endl; }[/code] Of course, if you actually want to store the … | |
Re: C or C++? This type of game would be suited to C++, in my opinion. I would create a base class, CObject, which would represent an object in the game. It could contain variables such as position, veloctiy, state and dimensions (size). Then for a book, I would derive a … | |
Re: [quote=cscgal;313960]jbennett, the problem was because your family installed spyware on your computer, based on our IM convo :)[/quote] That would do it. :cheesy: Anyway, I *have* experienced the problem jbennet mentioned maybe once or twice ever, which I believe is the result of the stylesheet file failing to load. A … | |
Re: [quote=williamh;313825]I want to post a thread[/quote] It's easy. Navigate to the fourm you want to post your thread in, and then click the "Post New Thread" button. [IMG]http://img440.imageshack.us/img440/6551/picture1gz8.png[/IMG] | |
Re: I'm not going to try to pretend I know what I'm doing... :rolleyes: I found the following messages on a mailing list: [URL]http://lists.rpmforge.net/pipermail/tools/2006-March/000299.html[/URL] [quote] > Hi, > > Since yum 8.0 on 9th March. > The first thing that I noticed was that updating RPMs that came in were ignored … | |
Re: Perhaps you need a DVD Player program on your PC? I can't quite remember, but the video section of the DVD doesn't always show up in a regular file browser on Windows. Often the only way you can access this content is by using a DVD player program. Also make … | |
Re: I don't know enough about your Mac to really know, but from the sounds of it you have more than 1 partition on your hard drive. You're probably booting from one, and that's the one that is full. One way to tell for sure is to open up System Preferences, … | |
Re: Hey there [B]ritgrad83[/B] - glad to have you here. We always need more programmers! [quote] Look forward to chatting and sharing lots of good stuff![/quote] I also look forward. Hope to see you in the programming forums. | |
Re: [quote=WaltP;313279]$35 a year down the drain....[/quote] $35? Nowadays you can get domains for $10 or less... I agree though that it's a stupid way to use the domain, especially when it's such a common word (I found that site just by accident a while back). | |
Re: Perhaps you should use Google - there's a wealth of information out there. [url]http://www.phdcc.com/shellrun/autorun.htm[/url] | |
Re: <double-checks calendar> Hey, I didn't even know Valentine's day was a holiday! Tells you how much [I]I[/I] like the holiday (which is not very much at all). ;) | |
Re: [quote]i<(num/2)+1[/quote] This line only loops until half of the number. That's because when you're determining factors for a number, anything larger than the number divided by 2 obvioulsy can't go evenly into the number. So to save time it cuts the number of loops it has to do in half. … | |
Re: I believe some Xorg configuration is needed. I found this Gentoo wiki page on configuring mice so all the buttons work properly: [url]http://gentoo-wiki.com/HOWTO_Advanced_Mouse[/url] A bit complex, but hopefully not too difficult to follow. Let me know if you get stuck. | |
Re: That computer is too old for Fedora Core 6. You might as well just forget it. Consider something that takes less RAM such as Xubuntu or Debian - Xubuntu being the distro which will recognize your hardware better, which seems to be an issue for you. | |
Re: Care to elaborate?[LIST] [*]What web browser you are using[/LIST][LIST] [*]Which websites this occurs on[/LIST][LIST] [*]Whether this has always happened or if it just started lately[/LIST] | |
Re: >What toolkit would you recommend with Visual Studio 2005? .NET if speed and portability isn't an issue, and you want to create interfaces using drag-and-drop technology. A good portable toolkit is [URL="http://www.wxwidgets.org/"]wxWidgets[/URL], which allows you to create interfaces using the platform's native interface code. It actually looks quite good. | |
Re: >hello there, im new here and i want to start learning c++. You'd be better off learning and being comfortable with C/C++ before you start learning Windows GUI programming. You'll just make it way harder for yourself, and there's really no hurry. I would suggest you start here: [URL]http://www.cprogramming.com/tutorial/lesson1.html[/URL] Also … | |
Re: Welcome here! And being a newbie is not a bad thing; after all we were all forum newbies at some point (even Dani!). Glad to have you here. | |
Re: You should provide more information about the broadband. Is it DSL, cable, or something else? One of the easiest ways to set up broadband is to connect your computer directly to the modem, so that there's less to worry about. Then you should check the following settings. Make sure that … | |
Re: Your input and output methods are weird - consider something like this: [code] char line[255]; while(1) { fgets(line, 255, stdin); // NOTE: ideally you should validate input before printing to file fputs(line, fout); } [/code] Anyway, you can't just use [inlinecode]stdin[/inlinecode] in place of a char *, which is what … | |
Re: Depends what you want to do with C/C++. If you're really serious, buy yourself a good book as described in the sticky thread previously mentioned. However, you can learn a significant amount from online tutorials, and although they only get you to a certain point, that point is actually far … | |
Re: Agreed with [B]Sanjay[/B], comments should only be added when they are needed. Why? You're not trying to teach someone the C/C++ language -- and although you may have a difficult time initally understanding the code, someone who is experienced with C/C++ will just have a harder time distinguishing between "junk" … | |
The new line numbers inserted when using syntax coloring code tags is causing me problems when copying and pasting code. Here are some examples: [URL]http://www.daniweb.com/techtalkforums/post311344-32.html[/URL] I copy and paste the code to my editor. This is how it looks when it's selected in my browser:[INDENT][IMG]http://img522.imageshack.us/img522/7406/picture1ji6.png[/IMG] [/INDENT]And this is how my … | |
| |
Re: Yes, but they didn't take daylight savings time into effect. By the time it gets to midnight, the clock will have already had to be set back by an hour. :p But seriously, this thing sounds like the stupidest thing I've ever heard of. They're taking all the words of … | |
Re: [quote=Infarction]bootcamp having support for >2 OSs (I've heard it doesn't)[/quote] Not quite sure what you mean. Boot Camp is only for Windows, and booting with Linux with/without Windows is best done with [URL="http://refit.sourceforge.net/"]rEFIt[/URL]. Which can handle several (not sure of the limit) OSs. Unless of course you meant support for … | |
Re: [inlinecode]extern[/inlinecode] means that the variable is defined somewhere else, and you're just declaring it. ...which means that you're missing the definition code for these symbols. Either you have to link it with some library that this source code depends on, or you're going to have to define it yourself. Either … | |
Re: Depends what you mean.[LIST] [*]If you're trying to compile a program which uses Freetype, you'll have need to link with [inlinecode]-lfreetype[/inlinecode] option on gcc/g++.[/LIST][LIST] [*]Are you trying to compile Freetype itself? Then please post the error messages you recieved.[/LIST] | |
Hey there, Whenever I try to load my user control panel, I just get a blank page. Perhaps this is because of recent DaniWeb code change, but just in case I'm not the only one who's experiencing this... The weird thing is that I can view my PMs if I … | |
Re: What exactly is this line for? [code] if ( choice1 = choice1 )[/code] Basically it's doing nothing. For one, it looks like you were trying to check a value, except that you need a ==. And for another, you aren't even comparing the variable with anything. Perhaps you want to … |
The End.