299 Posted Topics

Member Avatar for dlmagers

I'm not entirely sure what you're trying to do, but I took a guess: #include <iostream> #include <iomanip> using namespace std; int main () { // variables double salary = 0.0; int RATE = .03; //Why is this an integer? Integers don't have decimals. // enter salary cout << "Salary …

Member Avatar for dlmagers
0
197
Member Avatar for techy23

Try Allegro 5 or SFML 1.6. (SFML2 is nearing completion.) Program a bouncing ball. Then, program a VERY SIMPLE Tetris clone. After that, look into scripting languages. Start simple. Read in a file that says something like: show background.jpg show hero.png play music.mp3 print "Hero Game by Techy23!" Go from …

Member Avatar for DeanMSands3
0
241
Member Avatar for dot_binary

Have you tried 3D matrix transforms? http://www.fastgraph.com/makegames/3drotation/3dsrce.html

Member Avatar for DeanMSands3
0
159
Member Avatar for apanimesh061

YOUR. CODE. IS. BROKEN. Read the comments in the code. It's designed to fail. In my fully updated MinGW/MSYS install, I compiled it. Note the name I gave it. dean@stormbringer /c/Workspace/C++/DaniWeb $ g++ -std=c++11 FOR_73H_LULZ.CPP FOR_73H_LULZ.CPP: In function 'int main()': FOR_73H_LULZ.CPP:22:14: error: no match for 'operator==' in 'a == b' …

Member Avatar for triumphost
0
2K
Member Avatar for triumphost

***Madness?*** # THIS IS DANIWEB!! # Here are a few guides to help you out. http://www.cs.virginia.edu/~evans/cs216/guides/x86.html - Look at the table on the first page. Then jump to the next link. Jump back when the register functions make sense. http://www.eecg.toronto.edu/~amza/www.mindsec.com/files/x86regs.html - This gives an overview of which registers do what.

Member Avatar for DeanMSands3
0
165
Member Avatar for armydad1

Are you familiar with [B]stacks[/B]? A [B]stack[/B] is a data structure that is accessed only by it's last element. The simplest [B]stack[/B] is made with an array and a "top" index. When you start, you can set the top index to zero. To add data to the [B]stack[/B], you "[B]push[/B]" …

Member Avatar for -VLV-
0
213
Member Avatar for myk45

Here's a hands on example. (A good reference to look at first:) http://stackoverflow.com/questions/1395591/what-is-exactly-the-base-pointer-and-stack-pointer-to-what-do-they-point I modified the C code a little: int foo=1; int main(int argumentCount, char *arguments[]) { const char* bar = "Hello, Daniweb!"; char *firstArg; int num; num=1; num=argumentCount; num=0; firstArg=arguments[1]; firstArg=(char *)0; return num; } I compiled using …

Member Avatar for myk45
0
300
Member Avatar for triumphost

Ref: http://msdn.microsoft.com/en-us/library/windows/desktop/ms681944(v=vs.85).aspx Are you running in a seperate process? Are you familiar with multiple processes? Are you familiar with Interprocess communication? (It's really really fun!) A Windows process can only be tied to one console at a time. So... create a new process. From that process, call FreeConsole. The console …

Member Avatar for triumphost
0
338
Member Avatar for triumphost

The specification is hosted by libPNG here: http://www.libpng.org/pub/png/spec/1.2/PNG-Contents.html Read the specification and figure out how to write a decoder. If you've never worked with compression algorithms before like LZW and LZMA, it's probably a good idea to start now. **Actually, actually...** forget all that. Start with a **GIF** decoder. Learn …

Member Avatar for DeanMSands3
0
310
Member Avatar for fatimah batool

I'm going to go out on a limb and say the OP is asking for help in adding the ability to save data to and recall data from a file. Also, it seems the OP copy and pasted the code 7 times. To the OP's credit, the code was posted …

Member Avatar for Schol-R-LEA
1
202
Member Avatar for fl415

Dead thread is dead. Leave dead thread dead. On the subject of how to go about doing this there's a few different ways: A. Use pipes. B. Use sockets. C. Use environment variables. D. Use shared memory. Also, the OP didn't realize the word would be passed as a parameter …

Member Avatar for DeanMSands3
0
852
Member Avatar for TheBusDriver

Solved question is solved. But I'm going to throw this in here anyway. #include <cstdlib> #include <iostream> using namespace std; class A{ private: int i; int j; public: A(){ cout<<"Constructor being called!"<<endl; } ~A(){ cout<<"Destructor being called!"<<endl; } int getI(){return i;} void setI(int newI){i=newI;} int getJ(){return j;} void setJ(int newJ){j=newJ;} …

Member Avatar for sepp2k
0
657
Member Avatar for mrgadgets

SFML has multiple interfaces including one that is C-only (CSFML). http://www.sfml-dev.org/

Member Avatar for DeanMSands3
0
166
Member Avatar for Samyx

@Samyx: Try using a dictionary/look-up table approach. Create a table where you plug in the first two spots (0 and 1). Then have your program plug in the data if it isn't already assigned. You might want to fill the table with -1's at first, then assign the first two …

Member Avatar for DeanMSands3
0
3K
Member Avatar for Irbis

Some other guy had the same problem: http://www.imagemagick.org/discourse-server/viewtopic.php?f=6&t=13970

Member Avatar for DeanMSands3
0
340
Member Avatar for anandagrawalseo
Member Avatar for anandagrawalseo
0
50
Member Avatar for alaa sam

Whenever I start a new programming languange, I always like to start with the same basic program: A podcast ripper. A podcast ripper is a very simple program, but it gives you insights into different aspects of the programming language, the API, and the platform. 1. You download a podcast …

Member Avatar for madelinekim
0
325
Member Avatar for hwoarang69

Here're some others: First, get a copy of Oracle VirtualBox to run the new OS inside of. https://www.virtualbox.org MikeOS is a good place to get started: http://mikeos.berlios.de/ A related video is here: (Pay attention at **1:57** when he says this takes **effort**) http://www.youtube.com/watch?v=6MJUGVFAXKg These are a series of articles: http://linuxgazette.net/issue77/krishnakumar.html …

Member Avatar for Schol-R-LEA
0
247
Member Avatar for lxXTaCoXxl

Here's a hint: Line 114:`bool IsInt32(string s) {` Should look like: `bool Convert::IsInt32(string s) {` This is not the only change you will have to make. Later on, I suggest you change the *methods* in your **Convert** *class* into *static*'s so you can call them directly from the *class* instead …

Member Avatar for NathanOliver
0
238
Member Avatar for DeanMSands3

> tl;dr: MegaMan's storyline sucks. I want advice in writing it as realistically as possible. I want to dip my toes into the realm of fiction (due to much prodding by my wife). I decided I wanted to start with a fan-fiction project based on the popular game MegaMan (also …

0
133
Member Avatar for DeanMSands3

The rules of this game is simple: 1. Someone posts a word. 2. You make a (de)motivational picture out of it. 3. You post the picture and a new word for the next poster. 4. The base image can belong to anyone, but the completed captioned product must be yours. …

Member Avatar for DeanMSands3
0
142
Member Avatar for chamnab

First, learn to use Allegro. Start here: http://wiki.allegro.cc/index.php?title=Allegro_5_Tutorial Start with this one: http://wiki.allegro.cc/index.php?title=Allegro\_5\_Tutorial#Installing\_Tutorials Get your Allegro libraries setup in your compiler. Then get them ready to link into your project. (Many times, you will need to tell it to link in both Debug and Release configurations). Now check out the …

Member Avatar for Perry31
0
221
Member Avatar for DeanMSands3

tl;dr: I think my code sucks. Can you help me? I haven't written a test case for this class yet, but I want to make sure I'm doing it right before I go home tonight. The gist of the class is to provide a reusable ImagePrinter object that can print …

Member Avatar for DeanMSands3
0
229
Member Avatar for abrarsyed

@Sokurenko: I'm not the kind of guy who down-votes posts willy-nilly (unless you're being condescending and a complete ass), but your post is... not what the OP is asking for. Pass by value, not reference. Yours is reference. Granted, your code is instructive to new coders and you're not rude, …

Member Avatar for Trentacle
0
225
Member Avatar for Dudearoo

The h after the number means that's it's in hexadecimal. Hexadecimal numbers run from 0-9A-F. Each digit is multiplied by a power of 16. So 57h is 5 * 16^1 + 7 * 16^0. You can also use the **0x** prefix to denote hexadecimal. So 57h is the same as …

Member Avatar for Dudearoo
0
353
Member Avatar for DeanMSands3

I've got a program I'm writing that A. runs as a service B. grabs a screenshot of a specific window every X number of seconds C. prints it to the default printer. A and B are more or less done. C is confusing me. I'm looking for a way to …

Member Avatar for DeanMSands3
0
165
Member Avatar for missil9

Are you trying to read XML? I wouldn't use RegEx for it. http://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454#1732454 I use TinyXML2. It's pretty simple once you get the hang of it. http://www.grinninglizard.com/tinyxml2/index.html

Member Avatar for missil9
0
318
Member Avatar for Perry31

OK. This is a common problem for beginners. You have a pointer (**`*a`**). This pointer points to nothing. You do a scanf into the pointer. The program has an aneurysm. The stock market collapses! Puppies and kittens around the world suddenly vanish! Heh. So yeah. **`*a`** needs something to point …

Member Avatar for DeanMSands3
0
8K
Member Avatar for nuclear
Member Avatar for abelLazm
Member Avatar for DeanMSands3
0
263
Member Avatar for cool_zephyr

Webkit is the browsing engine used by Safari and Chrome. It's open source and cross platform. @OP: If you really really want WebKit, you could try using the QtWebKit port.

Member Avatar for cool_zephyr
0
512
Member Avatar for tomtetlaw

indices = malloc (sizeof(short) * data.face_count * 3); for (i = 0; i < data.face_count; i += 3); { indices[3 * i] = data.face_list[i]->vertex_index[0]; indices[3 * i + 1] = data.face_list[i]->vertex_index[1]; indices[3 * i + 2] = data.face_list[i]->vertex_index[2]; } Multiply i by 3. Try it. You'll like it.

Member Avatar for DeanMSands3
0
150
Member Avatar for phorce

What OS are you using? It makes a difference. Also, if you're looking to do a git like command, are you familiar with socket programming? Next, if you're connecting to a remote server (the way git does) how is the server going to handle your request and in what language? …

Member Avatar for Schol-R-LEA
0
136
Member Avatar for paranoidSandra

Put in checkpoints in your code like `printf("Client: Now entering client function.");` Tell us what happens.

Member Avatar for paranoidSandra
0
121
Member Avatar for firdousahmad

Start with a simple program. #include <stdio.h> int main(){ printf("Hello World!"); return 0; } Then expand on it. #include <stdio.h> char name[20]="firdousahmad"; int main(){ printf("Hello World!\n"); //The backslashed n starts a new line. printf("My name is %s.", name); //printf will replace the %s with the "name" variable. return 0; } …

Member Avatar for firdousahmad
-1
107
Member Avatar for LieAfterLie

The Visual Studio libraries probably aren't going to work for MinGW (what Dev C++ compiles with). MinGW = Minimal GNU for Windows. And Dev C++ is kind of dead anyway. Get a full MinGW installation (GCC & G++) with at least a minimal MSYS that has Make. Then get Eclipse …

Member Avatar for DeanMSands3
0
1K
Member Avatar for jaskij

I remember some code Mike Abrash had written that (I believe) found its way onto x2ftp. IIRC (If I recall correctly), he used K&R with **3**-space indents. I guess when you're Mike frickin' Abrash you can pull quirky stunts like that. **EDIT**: I stand corrected. He used **Allman**. But, yes, …

Member Avatar for two[ ][ ]
0
176
Member Avatar for Zvjezdan23

Lines 24 and 26. You've got a **for** loop variable **i** going from 0 to 9. You've got a comparison between `score[i]` and `score[i+1]` When **i** hits 9, that's a comparison between `score[9]` and `score[10]`. Silly question for the day: Does `score[10]` exist? Happy coding. -dean

Member Avatar for DeanMSands3
0
136
Member Avatar for Zvjezdan23

Let's start with the I'm a C guy, but this C++ stuff sounds really neat approach: #include <iostream> #include <string> #include <cmath> //#include <math.h> //Don't need this if you have cmath. #include <algorithm> using namespace std; int main() { int number_of_students, i; string dummy, *student_name; //Declare student_name as a pointer …

Member Avatar for DeanMSands3
0
133
Member Avatar for pahunrepublic

Have you looked here? http://ask.wireshark.org/questions/3885/truncated-cookies

Member Avatar for DeanMSands3
0
254
Member Avatar for vinnitro

Engine001 is suitable for what you want. First, visualize what you want. You want to create a Role-Playing game. Then start small. Make a game with a single room and a single character. Write some backstory on that character. Why is he or she in the room? What does he …

Member Avatar for Dasttann777
0
167
Member Avatar for Scuppery

I find that a lot of CS majors don't. As for myself, I do. I had a Romanian professor. Is Romania a good place to study if you're majoring in Computer Science?

Member Avatar for azareth
0
1K
Member Avatar for Hellblazer.

The best way to learn C/C++ is to just sit down with it for a weekend and play with it. Use it to draw a tree. Figure out the price of dinner for two plus tax. Write a number guessing game. Then when you're feeling ready, write a small program …

Member Avatar for sternone
0
203
Member Avatar for cppgangster
Member Avatar for rubberman
0
127
Member Avatar for Majestics

Have a look at WinPCap and the related project WireShark. Good luck and happy coding.

Member Avatar for DeanMSands3
0
322
Member Avatar for PeTo.

OK, your paradigm needs a little work. Three things I see. 1. What you're doing is you're **getch()**-ing every time you loop. **Getch()** is a show-stopper. The program won't continue until it has that key press. This won't work for an action game. You need to preface the getch with …

Member Avatar for PeTo.
0
2K
Member Avatar for runstreet

A recursive function calls itself with slightly modified parameters from those it was called with. Here's an example of a recursive function. unsigned long factorial(unsigned long n){ if(n>1) return factorial(n-1); else return 1; }

Member Avatar for nitinmbhanu
0
2K
Member Avatar for lxXTaCoXxl
Member Avatar for lxXTaCoXxl
0
301
Member Avatar for nitinmbhanu

This question has already been answered the last time you posted this. The BGI error is telling you that your program compiled by Borland Turbo C++ can't find the right file for its graphics library. And yes, we only need to see the article title to know it's Turbo C++. …

Member Avatar for DeanMSands3
1
250
Member Avatar for rony.united7

Ancient Dragon is right, but let me offer a few tips on how to hold the hammer. 1. Make sure Eclipse and the C Development Tools are installed. 2. Make sure you have a C++ compiler that will work with them. On Windows, I recommend MinGW w/MSYS. 3. Make sure …

Member Avatar for DeanMSands3
0
164

The End.