921 Posted Topics
Re: [QUOTE=Clinton Portis]Code[/QUOTE]What's this? You just supplied an entire program when all he wanted was help on one case. | |
Re: That's what happens when people revive old threads, other people post in it assuming it's a recent thread since it's been bumped to the top. | |
Re: If all you want to do is let allow the user to input the bitmap name, use [B]std::cin[/B] to get the name, and [B]strcat[/B] ".bmp" on the end. Change your main code like this:[CODE=CPLUSPLUS]int main() { int x1 = 0; int y1 = 0; int x2 = GetSystemMetrics(SM_CXSCREEN); int y2 … | |
Re: There are many reasons not to use that, a couple of reasons are: - It only works on integers - It fails if it tries to swap two variable both pointing to the same integer For example, it would fail here: [CODE] void Swap(int &a, int &b) { a ^= … | |
Re: [QUOTE=Ancient Dragon]Normally I think unions are place inside structures[/QUOTE]They can also be very helpful outside structures, for example in this snippet I made some time ago. [URL="http://www.daniweb.com/code/snippet217147.html"][link][/URL] I used it in the [B]main[/B] scope as a structure inside of a union instead of the other way round. It helps when … | |
Re: Depends on so many things, it could take a month if you did it intensively, or a year or two if you do it as a hobby every once in a while. | |
Re: My best advice for you right now is to learn how to program before you try anything big. Read books, tutorials, whatever. If you plan on doing this in Windows, you should try this tutorial [URL="http://www.winprog.org/tutorial/"][link][/URL], but be sure you understand everything you read. | |
Re: I'd go with option B, but that's me. Rashakil Fol's right, do what you enjoy, learning a new language when you already know one is usually easy. I've been doing C++ for a few years and just now I have to start learning Visual Basic, the only change big change … | |
Re: It's not so bad, the most damage one person can do is -1. Every time I see a post I think shouldn't be voted down, I vote it up. Or, if you can't be bothered with that, ignore the voting system altogether, I'm sure other people will take care of … | |
Re: [QUOTE]You're a complete noob. (Probably very , very young.. ) Newsgroups (Usenet) is by far the best place on the Web, for more than 20 years ! There are the greatest Win32 gurus, MS consultants, some of Windows creators, and best-sellers authors in the world (you can even find Bjarne … | |
Re: Have you tried [URL="http://msdn.microsoft.com/en-us/library/ms646312(VS.85).aspx"]SetFocus[/URL]? | |
Re: You can save them to a file, and open the file with notepad. | |
| |
Re: Tried searching the internet? [URL="http://www.daniweb.com/code/snippet222044.html"][link][/URL] This is a very commonly asked question, show us your code so far and we'll help you if you get stuck. | |
Re: [QUOTE=Phil++;1017700]My bad :( Ahh, I bet it isn't even right anyway, I haven't even tried to compile it. xD[/QUOTE] Never give code to anyone who doesn't show effort, you're just helping him cheat. | |
Re: If you place a static variable inside a function lets say, it is declared [B]once[/B], and is only destructed once the program is closed. For example, try compiling this:[CODE]#include <iostream> using namespace std; // Returns the static variable 'total' int addNum(int num) { static int total = 0; total += … | |
Re: Heh, I did the same thing, the first time it was williamhemswort, a typo in my username! Then got it split to william hemsworth, [I]then[/I] decided I wanted it capitalized to William Hemsworth :icon_lol: Thanks again for your patience happygeek :) | |
Re: Yes, merge them, all you have to do as far as i know is rename the second form to "Form2" and copy it to the first project. Once you've done that, linking them together isn't too hard. Try that first. | |
| |
| |
Re: You have no excuse for not using code-tags, you managed on your first post. | |
Re: Couldn't be much more vague. If you want to find out whether or not a key is down, read about [B]GetAsyncKeyState[/B]. | |
Re: [QUOTE]the MacBook Pro is virus and spyware proof, networks like a dream (I don't have an IT department - don't need one), [B]and just works[/B].[/QUOTE] [URL="http://www.thebestpageintheuniverse.net/c.cgi?u=macs_cant"]One thing PC users can do that Mac users can't.[/URL] Your whole post was just plain annoying, if people are comfortable with Windows, why do … | |
Re: Wrong forum, no code tags and no specific question. Once again, [URL="http://www.youfail.org/YouFailDOTorg.swf"]you fail[/URL]. | |
Re: Very vague, if you mean on a console window, then your best bet would be to use a library such as [B]nCurses[/B]. | |
Re: Remember, you're using managed C++, so you need to use managed types.[CODE]String^ ba = "41516.7095211088"; Double bb = Convert::ToDouble( ba ); Int32 rounded = (Int32)Math::Round( bb ); MessageBox::Show( rounded.ToString() );[/CODE] | |
Re: If you revived that forum, I would be there all the time! Also, the site's been expanding alot, maybe it's worth giving it another try, after all it's one of the most popular languages available. | |
Re: [QUOTE=customtshirts;1015386]I don't like games. I don't have a free time even a single minute in these days. How can i play games. But when i 'll free than i 'll try to play these falsh games.[/QUOTE]Yet you clearly have time for the geeks' lounge.. | |
Re: You show no effort == We show no effort. Give us your current attempt, and a specific problem, then we'll help. | |
Re: C++ automatically gives a structure a minimum size of 1 byte, not sure about C. | |
Re: [QUOTE]all the Letters and words came out looking like Arabic or something ?????? very odd. so the webmaster had to shut down the site. couldn't fix it or anything.. it was awful. do you know how to do it ???[/QUOTE]If it's [B]awful[/B], then you don't need to know how. | |
Re: If it's an std::string, do [I]mystr[B].c_str()[/B][/I] to get a character array, to access an individual character, do [I]mystr[[B]charIndex[/B]][/I]. This is all over the web, try searching first. | |
Re: Do it yourself, we aren't a free homework service. | |
Re: An enjoyable one, make an activity recorder, so it records your mouse and keyboard activity and plays it back at different speeds. I did it once (attached), might be an idea for you. Or were you looking for something more graphical / fun.. :P | |
Re: [QUOTE]Why should 0 be a hyperlink in this case?[/QUOTE]I guess Dani assumes that you have enough common sense to not click a link which will obviously get no results :) | |
Re: Thanks :) I personally think the voting system's awesome. | |
Re: Does your cousin ever go to the gym, do any sports, or keep himself active at all? That's the main problem, people submerge themself in technology so much that they do start to damage their own health. There's nothing wrong with technology, the problem is human fitness, everybody has time … | |
Re: You have to admit, for an 8 year old that's a pretty well presented post compared to some people on here who are in Uni. Stick to something easier for a while, believe me you're not ready for C++ yet, maybe in 3/4 years, in the meanwhile stick to VB … | |
| |
Re: You haven't described your problem at all, nor have you shown any effort. | |
Re: [QUOTE]im really lazy, and this seems like alot of effort.[/QUOTE]Well that's too bad, because here [B]you[/B] have to make an effort in order for us to make an effort to help you. Your idea is good, just don't let the idea overwhelm you, do it in parts. Does this function … | |
Re: Yeh, it wont work. For example in the very first part, you want to change this: [B]314.41778E-2[/B] to [B]31[/B] and [B]4.41778E-2[/B] However it could also be: [B]3[/B] and [B]14.41778E-2[/B] or just [B]314.41778E-2[/B] So AFAIK, it's impossible unless you have have some way of knowing where the number starts or ends. ![]() | |
Each page is taking me 20-30 seconds to load, it's pretty frustrating :icon_neutral: Is there a reason for this? | |
Re: I took this as a challenge, and managed it. I'm sure there's better ways, but.. it work perfectly for me. Compile this code, put your program in the same directory with the correct name, then run it.[CODE=CPLUSPLUS]#include <iostream> #include <fstream> using namespace std; int main() { ifstream in( "infile.exe", ios::in … |
The End.