Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+4
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
2 Commented Posts
~7K People Reached
About Me

I have always had a strong interest in computers and how applications work, so I recently took it upon myself to start learning C++, HTML, XML and JavaScript. I am still very much a beginner with programming, but I hope to really strengthen my skills…

PC Specs
ABS Mayhem z2: Windows XP Pro SP3 Intel Yonah 667MHz FSB 2MB L2 Cache, 1.66GHz (T1300) ATI Mobilityâ„¢…
Favorite Tags
Member Avatar for dgr231

Hey everyone, I've been working on learning the Win32 API for C++ so that I can start programming windows programs. I haven't run into any issues until last night when I tried to include a menu in my basic window through resources. I'm using Visual C++ Express 2010 which doesn't …

Member Avatar for mitrmkar
0
244
Member Avatar for Ponomous

pecet is correct. Also, don't forget to #include <ctime> so that you can use the time() function. -D

Member Avatar for vb6exp32
0
225
Member Avatar for dgr231

Hey all, I am currently working on building a small text-based RPG to practice C++. I am working on a function to load a saved game from information saved in a text file. Below is the code for the function: [code=cplusplus]void getSavedGame(playableCharacter& player1) { int stamina, health, mana, level, strength, …

Member Avatar for dgr231
0
241
Member Avatar for jsmarts

First, please use code tags for your code. Second, place [code=cplusplus]cin.get();[/code] right before return 0 in your main. That will hold the console window open until the user presses enter. Also, why do you have your drawbar function returning an integer? It seems like it should be a void function... …

Member Avatar for Shinedevil
0
146
Member Avatar for razo

[QUOTE=crazyboy;1031790]for Ans [a] :: - line 1 line 3 line 4 fro ans [b] :: - CC() { u = 0; v = 0; } for Ans [c] :: - CC(int i) { u = i; v = 0; }[/QUOTE] Don't just give out homework answers. Ask the person what …

Member Avatar for razo
0
133
Member Avatar for kadji.kahn

Hello kadji.kahn, I agree with everything that Sky Diploma said. In addition, you can shorten up your function a bit. This is what you currently have: [code=cplusplus]int average(int a, int b, int c, int d, int e) { int daverage; daverage = (a+b+c+d+e) / 5; return daverage; } //end average …

Member Avatar for cgeier
0
151
Member Avatar for anbuninja

It also appears that you have incorrect ranges for your letter grades (which gurudevashu has fixed in his revised code above): [code=cplusplus] else if (c >=79 && c <=70) {cout <<"C" << endl;} else if (c >= 69 && c <=60) {cout << "D" << endl;} else if (c >= …

Member Avatar for dgr231
0
162
Member Avatar for dgr231

Hello all, I am in the process of teaching myself CSS to go along with my beginner-intermediate knowledge of HTML. I am just starting with CSS and have created a small test file to attempt to create a table with one row and one cell in that row. I then …

Member Avatar for webexpertzhere
0
121
Member Avatar for tomtetlaw

Hello tomtetlaw, As JugglerDrummer mentioned above, you would use the member access operator "." For more information on the operator and structures in general (including pointers to structures and the member access operator through a pointer "->") you should take a look at the following website: [url]http://cplusplus.com/doc/tutorial/structures/[/url] -D

Member Avatar for Sky Diploma
0
111
Member Avatar for arelius

Hello arelius, I would suggest the following tutorial: [url]http://www.cplusplus.com/doc/tutorial/[/url] I starting learing C++ off of here before going and reading some books on it. As for practice problems, there is a section on this forum for them: [url]http://www.daniweb.com/forums/thread67837.html[/url] Hope that helps. -D

Member Avatar for dgr231
0
235
Member Avatar for blahbla

Hi blahbla, It seems to me that your best bet would be to create a new variable before you start your loop that you use to add all of your random numbers together. I would suggest doing the addition right before the end of your for loop so that every …

Member Avatar for blahbla
1
157
Member Avatar for Supercharger

Hey, I'm still pretty new to C++, but there are a few comments that I would make regarding mystuff.cpp: 1. You will want to inlude the <ctime> header as that contains the time function you use for seeding your random number generator. 2. It may serve you better for your …

Member Avatar for dgr231
0
154
Member Avatar for rajesh.hck

Hey rajesh.hck, I am also pretty new to programming and I downloaded Microsoft Visual C++ 2008 Express (it's free) and I like it very much. If you've already downloaded codeblocks from the link above then that should work fine as well, but my preference is for Visual C++ (I just …

Member Avatar for dgr231
0
99
Member Avatar for suutukil

You have already started a thread with the exact same name as this one where people are trying to assist you: [url]http://www.daniweb.com/forums/thread223471.html[/url] Why did you start a new one? If you are done with the old one, mark it as solved so that you don't have users continuing to post …

Member Avatar for mrnutty
-1
151
Member Avatar for xfreebornx

I have been watching your theads for the last few days, and you really do need to sharpen up and use the great advice that these guys have given you. Throughout your theads you have been given a lot of useful information that you should have incorporated in your program …

Member Avatar for hao001
0
318
Member Avatar for dgr231

Hey guys, I am still pretty new to C++ and am completely self-taught up to this point. I am currently learning about try, throw, and catch statements for exceptions and am trying to incorporate this into my programs. I know that normally when you allocate new dynamic memory, if the …

Member Avatar for gotorightway123
0
1K
Member Avatar for Epi23

Basing the code off of what firstperson has above, if you want to loop the program, you could use a while loop like so: [code=cplusplus]#include <iostream> using namespace std; int main() { int x=0; float a,b; while(x != 7) { cout << "Hello, please pick a type of problem from …

Member Avatar for Epi23
0
102
Member Avatar for xfreebornx

In this particular thread that VernonDozier posted above: [url]http://www.daniweb.com/forums/thread214101.html[/url] look at post # 12 by Ancient Dragon where he gives you two possible explanations as to how you could go about creating a delete function. I'm not a betting man, but I'm willing to bet that if you look at …

Member Avatar for xfreebornx
-3
440
Member Avatar for usagi713

While I am still new at C++, it seems to me that for your GetEmployeeRec function, you're going to want to pass your EmployeeRec objects to the function as references. i.e.: [code=cplusplus]getEmployeeRec(EmployeeRec& A, EmployeeRec& B)[/code] That way the function can directly manipulate the members of your objects. Also, you have …

Member Avatar for dgr231
0
179
Member Avatar for dgr231

Hello All, I am still pretty new to C++ and am just trying to create simple codes to strengthen my skills. I have written the code below that is supposed to allow the user to pick a shape (either circle, square, or rectangle) and then input either the radius or …

Member Avatar for mrnutty
0
152
Member Avatar for macobex

I'm still pretty new at C++, but try passing your argument by reference instead of pointer: [code=cplusplus]void foo(int &x) { int y = new int(999); x = y; }[/code] Passing arguments by reference should allow the function to directly manipulate that variable without the need for a return statement. I …

Member Avatar for dgr231
0
121
Member Avatar for stevenaseron

Hey, First off, please use code tags when displaying code as it will make it much easier for everybody to read. I have looked through the code you have so far and it looks pretty good, but I have made a few changes for the sake of functionality and the …

Member Avatar for stevenaseron
0
305
Member Avatar for hollywoood

In order to allow the user to enter new data or quit, you will want to place all of your code after your variable declarations in a while loop. That way, the user can go through the program as many times as he or she wants: [code=cplusplus] #include <iostream> #include …

Member Avatar for hollywoood
0
771
Member Avatar for CD-4+

Hello CD-4+, While I am still pretty new to C++, I believe that the compiler error that you are receiving is due to the fact that you have a semi-colon in your class definition of the meow() function: [code=cplusplus]# include<iostream> using namespace std; class cat { public: int age; int …

Member Avatar for dgr231
0
156
Member Avatar for chikool

Hey guys, If I'm understanding your problem correctly, then it seems to me like you want the program to look similar to the following outline: [code=cplusplus]#include <iostream> using namespace std; int main(void) { int nUserNum; //set the next variable equal to 1 so that if the user enters //only one …

Member Avatar for dgr231
0
108
Member Avatar for spoinkgeek

[code=cplusplus] #include <iostream> using namespace std; int main() { int adults; int children; int total_amount; cout<<"Press return after entering a number .\n"; cout<<"Enter the number of adults :\n"; cin>>adults; cout<<"Enter the number of children :\n"; cin>>children; { if (adults + children > 50); "warning to cashier\n"; total_amount = (adults * …

Member Avatar for mypicturefaded
0
370
Member Avatar for sara9111

You also may run into a problem because you have the variable first declared as a double but set it equal to the function one which returns an integer: [code=cplusplus]int one (int x, int y); double dec, a, first; first = one (6, 8); [/code] -D

Member Avatar for sara9111
0
171
Member Avatar for basitchk
Re: c++

Agreed, the threads at the top are a good start. I am a beginner as well, and I started with the following items: C++ For Dummies (updated for 2009)(I just went to Barnes and Noble or Borders and read a chapter a day) [url]http://www.cplusplus.com/doc/tutorial[/url] Hope that helps. -D

Member Avatar for Stefano Mtangoo
0
82
Member Avatar for dgr231

Hello all, I am in the process of teaching myself c++. I wrote one program successfully and I'm trying to write my second. I have run into a problem that I can not seem to figure out at all. I understand that this seems trivial, but I really need to …

Member Avatar for dgr231
1
154
Member Avatar for dgr231

Hey all, I know this is a very newbish questions, but I couldn't readily find the answer on this board so I figured I would ask. Consider the following code snippet: [code=cplusplus] for(i=0;i<5;i++) { int number; int counter; cout << "Enter a number less than 10:" << endl; cin >> …

Member Avatar for Salem
0
129