- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 50
- Posts with Upvotes
- 42
- Upvoting Members
- 39
- Downvotes Received
- 55
- Posts with Downvotes
- 34
- Downvoting Members
- 33
- PC Specs
- Ubuntu 12.04, and Windows 7 (almost never use it). Currently trying to setup FreeBSD.
293 Posted Topics
Re: Working program [CODE]#include <windows.h> void getcoords(int &x, int &y) { POINT cursorPos; GetCursorPos(&cursorPos); x = cursorPos.x; y = cursorPos.y; } int main() { int x,y; int x2,y2; int dx,dy; while(true) { getcoords(x,y); Sleep(30); getcoords(x2,y2); dx = x2 - x; dy = y2 - y; SetCursorPos(x-dx,y-dy); } return 0; } [/CODE] … | |
Re: I don't know about Turbo C++. I thought graphics.h was only for DOS?? But I know you can change colors and fonts with some Windows functions in <windows.h> | |
Re: In batch??? Why would you want to do that??? Batch is really old. It does not have graphics either, nor multiplayer capability. You can make a super simple word-based game but not much more. I advise you try C++ with DirectX or OpenGL or XNA Studio. PS.Is there any difference … | |
Re: A lot of the servers are Linux nowadays, and it seems it will stay that way for a while. So I would say PHP. But PHP has a lot of shortcomings that it still needs to overcome. The engine itself and the language. | |
Re: Granted. You know all the pain now which scars you for life. I wish I was the best programmer in the world | |
Re: yew, why conio? It is not standard and not even c++. It is c! And wtf is [CODE]#include <sstream>[/CODE] Never heard of it. sounds like it was developed by nazis lol | |
Re: Cool, thanks for posting! | |
Re: [QUOTE]Anything you can do with a while loop, you can do with a for loop.[/QUOTE] Anything you can do with a for loop, you can do with a while loop. To the OP: If you get ANY programming book about C or C++, you WILL find both kinds of loops … | |
Re: Not sure if it works but this is what I found [CODE]#include "bloader.h" int main(); /*Global Variables BAD BAD:) */ unsigned int oldEBP; struct boot_dir *viewableDirectory; int totalMem; char * passedParams; /*end global vars */ void _start(int memSize, char *parms, struct boot_dir *loadedfiles) { asm("mov %%ebp, %0":"=m"(oldEBP)); viewableDirectory = loadedfiles; … | |
Re: Good job, but I don't see the reason to post it here unless you have a question, or just want to share something cool/smart idea from your program. At first you didn't even post the link to the program :D | |
Re: Normal cin sucks so I midified it and this is are 2 functions I use instead of cin: [CODE]int kcin(int i) { int variable; while(1) { if (cin >> variable) { break; } if(cin.fail()) { cout << "Input Again: "; cin.clear(); cin.ignore( 1024, '\n' ); //spend a lot of time … | |
Re: I like my life, and I don't have any "wishes", unless you consider the goals in life as a wish. This is what happens if your wishes come true: [QUOTE]1) Earn big bucks 2) Have the opportunity to unravel the screts of the Ancients or mystery Example : Bermuda Triangle, … | |
Re: Yes, he cannot not be Chuck Norris. Why are you not asking funny questions and the replies are not that funny either? | |
Re: Lenin. He tried to create something good and Stalin destroyed it. | |
Re: Linux is kernel. It does all that stuff. Maybe you mean different distributions of Linux? I advise you read the book The Linux Porgrammer's Toolbox by John Fusco. It has a big section about Linux kernel and how it operates. It is impossible to cover all the aspects of it … | |
Re: An Englishman, Frenchman, Mexican, and Texan were flying across country on a small plane when the pilot comes on the loud speaker and says " We're having mechanical problems and the only way we can make it to the next airport is for 3 of you to open the door … | |
Re: What is your OS? | |
Re: The Ten Commandments [CODE] char * commandment[10]; commandment[0] = "Thou shalt not dereference a null pointer.\n"; commandment[1] = "Thou shalt not dereference a null pointer, in any case whatsoever.\n"; commandment[2] = "dmr cannot stress this enough: thou shalt not dereference a null pointer.\n"; commandment[3] = "Thou shalt not dereference a … | |
Re: You change your signatures really often! I remember you used to have a different one! | |
Re: I started programming almost 3 years ago, when I was 11. First I did some HTML (which is not programming language indeed), but then I really quickly jumped into C++, which is still my language of choice. Currently, I know C++, Python, some Lisp, and trying to learn Assembly. Sadly, … | |
Re: cat? Would you like to get a million dollars? Yes/No are the possible answers. | |
Re: Drawing this stuff on a paper always helps me out. When you have more then 1 element, just store the position of the previous one in an array, for example struct point { //just a simple point class. int x,y; point() = default; point(int X, int Y) :x(X), y(Y) {} … | |
Re: Yes Tymplee is right. SDL is cross-platform and really useful. You can also add 3D graphics with OpenGL to it if you want to. | |
I decided to learn C++ STL and I was exprimenting with STL containers. I saw this example [here](http://www.cplusplus.com/reference/stl/vector/insert/): // inserting into a vector #include <iostream> #include <vector> using namespace std; int main () { vector<int> myvector (3,100); vector<int>::iterator it; it = myvector.begin(); it = myvector.insert ( it , 200 ); … | |
Re: Do you have G++ or GCC installed? It has several different download versions at it's download website. Pick the bigger one with G++. If Code::Blocks worked before on your computer try to remember what you modified before it stopped working. | |
Re: Please post the solution. This may help someone in the future. | |
Re: 00001101 00001010 01011010 01011010 01011010 01011010 00100100 01011010 00100100 00100100 00100100 01011010 01011010 00100100 00100100 00100100 00100100 00100100 00110111 00110111 00100100 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 00110111 01001001 00110111 00110111 01001001 01001001 00110111 01001001 00111111 … | |
Re: Did you specify where compiler should look for that library headers? Does including Matrix.h give you an error? btw, what compiler are you using? | |
![]() | Re: Please read [this](http://www.cplusplus.com/reference/stl/vector/). Some tips for posting questions Try to make your post as short as possible and to the point. Most problems are easily solved by google. Try to only post most relevent information. |
What is the difference between standard, int main(int nargs,....); and [CODE]int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd ); [/CODE] I am making a cross-platform program, for windows and linux, and until this point, I used main, without WinMain, for windows and linux. My app calls windows … ![]() | |
Re: What do you mean [QUOTE]i want execute this code in c ...[/QUOTE]??? You want assembly program or C program??? I think it will be really hard to do in Assembly, why do you want to do it in the first place? | |
Re: [CODE]/** * Numerics.cpp */ #ifndef NUMERICS #define NUMERICS #include <sstream> #include <string> using std::stringstream; using std::string; /** * Convenience class for enabling easy * conversions between strings and primitive types. * * This class is not meant to support non-primitive types, * but it should if target class Type has … | |
Re: [url]http://www.wnyc.org/shows/lopate/201...le-do-no-evil/[/url] Page Not Found © 2011 WNYC Radio | |
| |
Re: I would say, you should use WxWidgets. If you need a lot of graphics use SDL. | |
I know that by default member functions of a class are inlined [CODE] class d { public: int a() { return 1545435; } }; [/CODE] And I also know that it's not allowed to declare functions in headers unless they are inlined. Is there a way to declare a function … | |
Re: [QUOTE]Bill Gates money: school computers in African bush villages without electricity Michael Jordan money: 200mph capable Ferrari stuck in an LA traffic jam Both actual, Bill Gates donates a lot of money to organisations buying computers and medical supplies for developing countries, Jordan spends it all on expensive toys for … | |
Re: [QUOTE]For those of you who are tempted to chime in that Turbo C can be run successfully on Windows 7, stuff it.[/QUOTE] But, but, it is EASY to run it on Windows 7. I did it in Virtual Box in only 6 hours! [QUOTE]Can any one please tell me that … | |
Re: [QUOTE]The syntax is either way off for C or so confuscated as to be unreadable. Semicolons are missing or misplaced. It's hard to tell if there are function declarations or variable declarations. Etc. [/QUOTE]It's not only C syntax. It has bad style even FOR C and I don't think it … |
The End.