293 Posted Topics
Re: Wow, [CODE] while (true) { cin >> number; if (num > 0) break; else {cout << "Incorrect";} } for (int i = 0; i < number; i++) { cout << i << "\n"; [/CODE] I wrote it in about 30 seconds... | |
[URL="http://www.youtube.com/watch?v=XZ5TajZYW6Y"]This[/URL] is the link to the article. Intel just announced that it is releasing a new 124 bit 16 core 3.6 Ghz processor to market. It's base price is going to be $2200. What do you think guys? | |
Re: [QUOTE]- I have started to grow grey hair after I started programming - I have started to have notorious thoughts about my computer after I started programming. - I have started to think like a semi-computer in my daily life[/QUOTE] LOL [CODE]More manuals, fewer novels[/CODE] Exectly same here! I now … | |
Re: I am going to get mine when I will be 15 :) | |
Re: No real programs are made in Java, so you don't really need it. Only several small once, written by people who don't know C++. Java is for beginners, and I have only 1 Java program on my computer. And I don't see much Java programs online. | |
Re: Iteration is like a while or for loop [CODE]for (int i = 0; i < 100; i++)[/CODE] and recursion is a function calling itself for example: [CODE]using namespace std; int function(int a) { if (a == 100) { cout << "\n\n\nResult reached! A = " << a; return a; } … | |
Re: Use code tags. And for the question, you getline(), just like you specified in the title. Getline(), is a function, it is part of istream (iostream include), and this is the prototype: [CODE]istream& getline (char* s, streamsize n );[/CODE] You can find more info [URL="http://www.cplusplus.com/reference/iostream/istream/getline/"] here[/URL]. EDIT: You got to … | |
I have an old computer that I am trying to install Ubuntu to. It is 10 years old and my dad made it for my older brother. It used to reboot sometimes when I did certain tasks, for example when I was trying to play video game.. etc., but I … | |
Anders Behring Breivik killed about 80 people on Friday in Oslo, Norway. He first detonated a bomb in the building (which killed 7 people) and then went to an Island Camp that was sponsored by a Norwegian ruling party, Social Left party, and killed about 70 people there. He did … | |
Re: I don't understand, you can't pass the arguments, or you don't know how to make it look all nice? To pass the arguments, you just take the parameters from main: [CODE]int main(int argNum,const char* argv[]) {} [/CODE] argNum is the number of arguments (with spaces), 1st one being the program … | |
Re: I think this is not homework. I tried to think of an algorithm for a while, but I suck at it (plus I am only 14), so I decided to write the hard, computation power, brute-force function to do that. But it too, takes a while. So when I am … | |
Re: [QUOTE]thanks but what to do with this hell assignment[/QUOTE] Go to google, find OpenOffice, get the source code, and send it to your teacher xD | |
Re: If I am not mistaken, It will probably crash the program. 1.)The space for the pointer p was not allocated from the system. This means it does not belong to you. 2.)Declaring main with (or without void), is undefined behavior, you should use int main(). You are incrementing the value … | |
Why almost always capital letters are used when defining macros or variables like [CODE]#define SOMETHING 432[/CODE] instead of [CODE]#define something 3243[/CODE] Also, why in macro definition x is used for example [CODE]#define macro(x) (x*x)[/CODE] Does the letter matter, and can longer variable names be used like [CODE]#define MACROSQUARE(variable) variable*variable[/CODE] | |
Re: This is really hard tast. You should try AutoIt, because it has a capability to read websites without any libraries -- its all build in. | |
Re: Can you also post a link to your last C++0x tutorial (about RAII Class)? I haven't finished reading it and I lost the link :( #EDIT# Never mind, I found [URL="http://www.daniweb.com/software-development/cpp/tutorials/373787"]it[/URL]. | |
Re: Pretend like you are coding in C, because C++ is a subset of C, so everything you can do in C you can do in C++. | |
Re: Wow, I didn't know C++ had or, I thought only Python had it, and I always used ||. Is "or" a standard or is it just added by the compilers, because they are so nice? | |
Re: No, header file is completely different from cpp file. windows.cpp :D. I don't think Microsoft will just give away all there code. Internet Pirates would also really like kernel.c, with all the windows code xD. | |
Re: I usually use Chrome but I am playing a game where I kinda ehhh... have several accounts and firefox has a really cool feature to make profiles and I can play from different accounts at the same time. So I sometimes use firefox but mostly Chrome | |
Whats the difference between [CODE]using namespace NameSpaceName;[/CODE] and [CODE]namespace NameSpaceName;[/CODE] ? | |
Re: Just watched a South Park Episode about Facebook, it was hilarious :) Here is the [URL="http://xepisodes.com/south-park/season-14/episode-4-you-have-0-friends/"]link[/URL]. Personally I have a facebook account but never visited it. I played farmville at my mom's account xD before and all her friends were inviting me to there farms, then I put up a … | |
Re: something like this: [CODE]#include <iostream> int main() { int counterone = 0, countertwo = 3, counterthree = 54; bool runloop = true; while(runloop == true) { std::cout << "Loop counter one " << counterone << "\n"; std::cout << "Loop counter two " << countertwo << "\n"; std::cout << "Loop counter … | |
Re: You should be able to do it with WxWidgets. Try [URL="http://wiki.wxwidgets.org/Drawing_on_a_panel_with_a_DC"]this[/URL] link. | |
Why doesn't this work: [CODE]#include <iostream> class myclass { public: union d { int i; }; }; int main() { myclass i; i.d.i = 3; return 0; } [/CODE] but this does: [CODE]#include <iostream> class myclass { public: union { int a; }; }; int main() { myclass i; i.a … | |
Re: 1) In 7th grade. When I was 11 years old. 2) Programming is not boring at all!! I consider it much more fun that many other activities, so I do it not because of boredom, but because it is so fun. I guess it kinda pushes other hobbies (and life) … | |
Re: [CODE] int game; printf("round one"); . . . //other game stuff printf("round two"); . . . //round 2 stuff [/CODE] Thats the most obvious way to do it. | |
Re: [QUOTE]Something like:..[/QUOTE] OR you can just always thread. On Linux you can use fork(). On windows call CreateThread(), something like this: [CODE]#include <windows.h> #include <iostream> DWORD CALLBACK threadFunc(void*) { printf("New Thread"); return 0; } int main(int argc, const char* argv[]) { DWORD id; HANDLE h = CreateThread(NULL, 0, threadFunc, NULL, … | |
![]() | Re: All the good programmers know that you should not make your program over-complicated because it will make the program buggy and will make it crash sooner or later. I guess politicians didn't learn that yet. U.S. (and other Western countries') economy is really fragile, and too complicated, therefore prone to … ![]() |
Re: You reached 251 points, so you achieved position 55808 of 431845 on the ranking list You type 341 characters per minute You have 60 correct words and you have 1 wrong words | |
Re: You want to include <stdio.h>? #Define is completely different! Define works like this [CODE] #define error 1 #ifdef error #error "Error is defined" #endif [/CODE] But if you want to include something you have to use #include like this [CODE]#include <iostream> #include <cstdlib> [/CODE] 2nd question: Debugger is pretty straight … | |
Re: cout << SOFTWARE; cout << S; cout << SO; cout << SOF; cout << SOFT; cout << SOFTW; cout << SOFTWA; cout << SOFTWAR; cout << SOFTWARE; crappy question, crappy answer | |
I want to make my own web-site, and I know HTML (everyone knows it :D) and some PHP. I have a lot of experience with Windows and Linux (Particularly Ubuntu) but I never had my own server, except WAMP that I used for learning PHP. My web-site is not a … | |
Re: Try using the function SetCursorPos(int,int); (assuming Windows). You can use it with command prompt or Windows. Edit: Dev-C++ is old, and I never used it. You should switch to more modern IDE which has a newer compiler. | |
Is there Linux functions equivalent to Windows functions [CODE] mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0); mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0); SetCursorPos(x,y); [/CODE] Specifically Ubuntu, GNOME. I tried to search on google, but did not find anything useful. | |
Re: I support National Socialism. I also find Mussolini and Lenin (especially his beard) really sexy. You should be glad that I am not old enough to vote. | |
I want to make my own web-site, and I know HTML (everyone knows it :D) and some PHP. I have a lot of experience with Windows and Linux (Particularly Ubuntu) but I never had my own server, except WAMP that I used for learning PHP. My web-site is not a … | |
Re: [QUOTE]Area 51 is a place where the experiment on dead aliens or maybe alive one too See this[/QUOTE] Geek stuff :D | |
Re: REgisters cleaners are useless, and anyone who tells you to use one, should quit programming, and become a garbageman or something! Registers do not slow down your computer, it is a lie. You should not use it! | |
Hello people, I recently made a small program, for a game called canvas rider (canvasrider.com), that makes ramps (probably not really important what it does). I want to register it under GNU GPL license. I know I will have to give away the source code, and I want to do … | |
Hello, I am making a program that will draw a ramps for a bike game. It does that by making many lines which form a ramp or other figures. For one of the ramps I have a small problem. In the game if something is too smooth, it will slip … | |
Re: lol, I am 13 too. To make a game you will have to learn programming. Get a nice C++ book first. But most kids get bored of it really fast and they want to make "cool looking games" instead of doing basic stuff in command prompt. But if you are … | |
Re: [CODE]class football { int wins; int lost; bool goodteam; }; [/CODE] The best way to do this is to use classes. This is what C++ is all about, and its main difference from C. | |
Re: [QUOTE]Vodka, gin and Irish Mist are my favorites.[/QUOTE] I hate that stuff. I tried vodka once and it was horrible. People drink it to only get drunk. I like to drink Russian or German beer (so good with dry Russian fish!) and I love the wine my grandmother makes. I … |
The End.