Posts
 
Reputation
Joined
Last Seen
Ranked #315
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
88% Quality Score
Upvotes Received
28
Posts with Upvotes
21
Upvoting Members
19
Downvotes Received
3
Posts with Downvotes
3
Downvoting Members
3
10 Commented Posts
~56.5K People Reached
Favorite Tags

108 Posted Topics

Member Avatar for jimJohnson

[code] int main () { //Declare variables int choice; //Set the numeric output formatting //cout << fixed << showpoint << setprecision(2); do { //Display the menu and get the user's choice. showMenu(); cin >> choice; //Validate the menu selection. while (choice < 1 || choice > 5) { cout << …

Member Avatar for michealadejimi
2
12K
Member Avatar for restrictment
Member Avatar for emeraldamerican
0
6K
Member Avatar for restrictment

Well we all have seen the common questions on creating squares and hollow squares out of asterisks in C++, but how about creating a program that prints out a circle in asterisks? Obviously this would look like an oval due to line adjustment, but it would be quite interesting to …

Member Avatar for CharlieCap
2
2K
Member Avatar for restrictment

I accidentally posted a lower version of the game that had more flaws, and a few less features. This one has a few more minor bugs fixed, and a power attack instead of a normal attack.

Member Avatar for apkrieg
0
683
Member Avatar for Shinedevil

Pretty long, ALMOST twice as long as the rpg I made a little while back. Sadly it does not work in VC++, did you use Dev? (102 errors)

Member Avatar for mrpi64
0
2K
Member Avatar for restrictment

I keep getting errors and I don't know why.. #include <iostream> using namespace std; class IceCream{ private: int flavor[3]={0,0,0}, topping[3]={1,2,3}, scoops[3]={4,5,6}; public: int getFlavor(int); int getTopping(int); int getScoops(int); void setFlavor(int); void setTopping(int); void setScoops(int); }flavorX, toppingX, scoopsX; int IceCream::getFlavor(int choice){return flavor[choice];}; int main() { cout << flavorX.getFlavor(1); system("PAUSE"); }

Member Avatar for mike_2000_17
0
144
Member Avatar for restrictment

Hey everyone, I am taking an online C++ class and part of our assignment is to complete a whole bunch of small program snipits on a site called myprogramminglab.com. This one program seems to have me stumped as I am not very familiar with Data structures. Could someone help me …

Member Avatar for restrictment
0
260
Member Avatar for maria536
Member Avatar for restrictment

Hey guys, I need a really simple code for chatting across consoles. I have looked up many tutorials on how to do this, yet they all seem to fail. All I want is a VERY simple chat that sends data from the client to a file, and then receives the …

Member Avatar for restrictment
0
1K
Member Avatar for restrictment

Hey Everyone. I recently created a game in abode director, and lost the .dir file. I currently ONLY have the .dcr, and back when I created the game, I added an obnoxious 'permanent' banner to an old affiliate who did not support me back. (So I would prefer to no …

Member Avatar for restrictment
0
88
Member Avatar for bman214

Well, you can "Jump" To different sections using a simple goto statement. However, goto's mess up the format of your code, and therefore is bad practice. So I would recommend using while/do-while/for loops to go to different parts of your code. If you don't care about your format, then here …

Member Avatar for bman214
0
207
Member Avatar for hq1

[QUOTE=Suzie999;1344486]I've noticed a lot of posts here with kids wanting their homework done. Is this a new thing or has it always gone on? and does anyone ever fall for it?[/QUOTE] Yes and Yes. Although people who give the codes away without any effort from the receiving end and those …

Member Avatar for Fbody
0
461
Member Avatar for RickSMO

When you run the program select, Debug > Run without debugging. This makes it so the screen will stay open. Or you could use System("Pause"); but that makes your code un-portable. Or you could use cin.getch or something like that.

Member Avatar for Narue
0
160
Member Avatar for restrictment

Hello all, I need help with a scientific notation problem. I am to create a program where the user enters a 5 digit number, and it is displayed in scientific notation. This part is easy, however I am trying to take it to the next step and make it so …

Member Avatar for burcin erek
0
171
Member Avatar for Suzie999

Looks fine to me. [code] #include<iostream> #include<String> using namespace std; string __stdcall myFunc(string s) { if (s == "banana") { return "Good String"; } return "Bad String"; } int main(){ string s = "banana"; cout << myFunc(s) << endl; } [/code] ***Maybe you forgot the "#include<String>" header?

Member Avatar for Suzie999
0
124
Member Avatar for parrishnewbie

Please use code tags, and all of the "text" in the switch statement is not needed. You just need to change the amount within the switch. you also have a few unneeded headers. Also, your decimal allocation code is a bit long, and you can shorten that up to one …

Member Avatar for restrictment
0
951
Member Avatar for ze_viru$

My first game I wrote was an rpg(made it yesterday), so yes..I am new as well. As a matter of fact, I've only been learning c++ this month. Anyhow, make an RPG where you choose your character and battle enemies...it isn't as complicated as you would think.

Member Avatar for ruwaiz1028
-3
3K
Member Avatar for restrictment

Have any of you just felt like expressing your feelings through text in the most efficient way possible? Well Poetry can usually satisfy that urge. So post them here, and comment on the ones you would like. I myself am not a writer or anything close to that, but I …

Member Avatar for diafol
0
150
Member Avatar for Ayaat Monem

ACII characters are just a bunch of random characters assembled to create one grand character. Here is an example of a 'T' in ASCII: [code] ************* ************* *** *** *** *** [/code]

Member Avatar for abhimanipal
0
278
Member Avatar for o.anhbayar

why is 'Rob' capitalized in robot? Is this in dedication to Robert Martinelli? But yeah, you need to start off with the basics first. ;D

Member Avatar for nbaztec
-4
189
Member Avatar for bobbyg118

I looked at it, and I would suggest adding a random number between 1-4, and then adding a simple 'switch' statement to change the comment based on the random number. And as hnizamoglu said, it would be more convenient for us if you posted the code embedded into the site …

Member Avatar for Ali Shah Ahmed
0
100
Member Avatar for smitysmit

Yes it is possible. You can use any of the following functions to do so as well: The standard, unportable [URL="http://linux.die.net/man/3/system"]system()[/URL] process, or these ones which give you a bit more control: [URL="http://www.manpagez.com/man/2/fork/"]fork()[/URL], [URL="http://linux.die.net/man/3/exec"]exec()[/URL], [URL="http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx"]CreateProcess()[/URL]

Member Avatar for restrictment
0
153
Member Avatar for restrictment

Hey everyone, I got bored and decided I wanted to make a 'pitch' cards game in c++, however I came across the problem of generating all 52 cards in a deck without duplicating the same card. So basically, I just want to print out every single card in the deck …

Member Avatar for iamthwee
0
197
Member Avatar for Dinglish

So many errors. Your semicolons were in the wrong place, you have the incorrect definition of using greater-than/less-than symbols, you should switch to the header, <iostream> without the ".h". You also need to make the main function, "int main()", not just main. Well, there may be errors, but I got …

Member Avatar for Dinglish
0
130
Member Avatar for restrictment

Hello everyone, I am trying to make a simple web browser for my own benefit (not a school project). I have been looking through multiple videos on how to do so, and could only find 'simple' web browsers on almost every video for visual c++. Anyway, the videos work, but …

Member Avatar for jonsca
0
214
Member Avatar for restrictment

Hello, I have been having a problem with the following code: [code] #include<iostream> #include<time.h> #include<iomanip> using namespace std; int main() { float average; setprecision(5); fixed; average = 100-((25/(130-(50-(130/3))))*100); cout << average << "\n\n"; } [/code] I cannot seem to get the 'average' variable to come out to exactly 79.73 like …

Member Avatar for restrictment
0
92
Member Avatar for restrictment

Well, I had my program running perfectly, and I was quite pleased with the results. However, after I made the text file a bit big, the program just stopped working all together. (255 lines of text) so I 'suppose' it is a bandwidth problem..however 255 lines of text is like …

Member Avatar for david.k
0
176
Member Avatar for restrictment

Heh, well my daily project is near finished, and I was looking around for a way to get rid of punctuation from a character array. I looked through the web a bit, and only found immensely complicated formulas which I did not feel like dealing with. So my question is: …

Member Avatar for restrictment
0
214
Member Avatar for restrictment

Please tell me why this doesn't work: [code] #include<iostream> using namespace std; int main() { char felix[3] = "ho"; if(felix == "ho") cout << felix; } [/code]

Member Avatar for restrictment
0
173
Member Avatar for restrictment

Hey guys, sorry I am asking so many questions lately, but I am learning this stuff by myself, and find it easier to ask questions here than look online. Plus when I try using the search engine on this site, it takes me to some quite random threads. Anyhow, onto …

Member Avatar for trcartmill
0
233
Member Avatar for hurricane123

Well, first off you are not asking the user for one of the designated arrays. you would need something like this: [code] for(int x=0;x<5;x++) cin >> no[x]; [/code] Next: Your loop is not going to work. It should be: [code] for(int i=4;i>=0;i--) cout<<no[i]; [/code] On another Note: Be sure to …

Member Avatar for restrictment
-1
107
Member Avatar for Violet_82

To expand upon what nat had showed you, I would also like to introduce you to 'loops' and 'switch statements'. They are not hard to learn, and are essential when making a program. Using the 'goto' statement is not a good way to integrate a loop. Avoid it at all …

Member Avatar for jonsca
0
157
Member Avatar for khaled.s

[QUOTE=khaled.s;1146501]Ok, so now it's working. But i still don't know how to to continue playing if the player wants to play again. Please help! [CODE]// Written by Khaled Alakhond // March 2, 2010 // // #include <iostream> using namespace std; int main(){ for (int i = 0; i < 1000; …

Member Avatar for WaltP
0
215
Member Avatar for timbomo

wait wait, why are you not using nested 'for' loops to make the triangles? It will make your code much shorter/efficient. If this was assigned by your teacher, I am sure that this is what he expects you to do.

Member Avatar for timbomo
0
297
Member Avatar for ne0_komodo

Hello, I know you did not ask for this, but I just wanted to point out that you don't actually need three 'for' loops within both of your main 'for' loops. You can actually just use two. As well, you can make it so you don't need so many different …

Member Avatar for ne0_komodo
0
195
Member Avatar for jameslat

[QUOTE=jameslat;1140842]right. my question is how can i make this program? i'm not new to programing, just in C++. so how could i go abt making this simple software? thanks for any help.[/QUOTE] You can make this program by becoming more adept in the C++ language. There are multiple tutorials online …

Member Avatar for jameslat
0
88
Member Avatar for oxy77

[code] int N=0, x9=0; for(N; N <= 15; N++) double x9 = 0.0; for(int n = 0; n <= N; n++) x9 = x9 + pow(double(-1), n)*(4/(2*n +1)); cout<<x9<<endl; [/code] This gives me the answer of '3', so it works. Not entirely sure what I did, but the solution is …

Member Avatar for oxy77
0
99
Member Avatar for amia

I has a solution to your problem! =D ..and here is your genuine answer: write a c program that computes the grade of a student using the formula. grade=40%major exam+30% ave of two long exams + 30%ave of 3 short quizzes.. Display the average of two long exams,average of 3 …

Member Avatar for restrictment
-1
89
Member Avatar for faaz

Is it just me, or does this thread look astonishingly similar to this one?: [url]http://www.daniweb.com/forums/thread261832.html[/url] Please try not to double-thread, as I don't like to read the same thing twice. :( Also, I posted the formulas that you needed on the other thread. Just integrate them into your current code..but …

Member Avatar for restrictment
0
1K
Member Avatar for faaz

Well, I honestly never did anything like this before, but I thought about it for a bit, and came up with a fairly simple formula for figuring out the change. I am not sure if this is what you are looking for, as your coding is a bit more advanced …

Member Avatar for restrictment
0
773
Member Avatar for bori02082009

To me, it seems as though your teacher is trying to show you how to use the modulus operand. Since you know that the modulus essentially figures out the 'remainder' of the number that you divide, it would be logical that [code]123 % 10 =3[/code] So now that you know …

Member Avatar for abdelhakeem
0
166
Member Avatar for skorm909
Member Avatar for restrictment

Alright, this is the best text based RPG I have created, and I have refined all the bugs and such. I have gotten a few questions on whether it is beatable without dying, and it IS beatable without dying, but be aware that you most likely will die quite a …

Member Avatar for rom87
2
922
Member Avatar for moein_soltani

[QUOTE=moein_soltani;1134181]Can you say how you find this error?[/QUOTE] You find these errors by 'debugging' your code. I would recommend Visual C++, as it seems to be the easiest to use/most detailed in my personal opinion.

Member Avatar for moein_soltani
0
2K
Member Avatar for abel kaleab

[URL="http://www.daniweb.com/forums/announcement8-2.html"]Please Read Before Posting!![/URL]

Member Avatar for restrictment
0
108
Member Avatar for LemonLemon

Adding the code would help. Anyway, just try putting in, system("cls") at the bottom of your code, then run it.

Member Avatar for restrictment
0
148
Member Avatar for marirs07

If you are asking whether or not you can run C/C++ programs on a browser, the answer is no. I was also wondering the same question a while ago, but sadly there is no way for a client to run your program unless they DL it.

Member Avatar for restrictment
-2
76
Member Avatar for foxmulder

[QUOTE=foxmulder;1082652] The game must be text-based [/QUOTE] [QUOTE=Dany_08;1086897]u need graphics[/QUOTE] No, I believe he wants it as text base. Why would you need graphics for this? All you need to do is have the user input the angle (1-180), and the force (1%-100%). Then make a calculation that will determine …

Member Avatar for restrictment
0
88
Member Avatar for restrictment

Hello, I need help with this problem I came across. What I have is this: [code] char answers[5][4] = {{'1','2','3','4'},{'10','0','3','0'},{'1','0','0','0'},{'1','2','3','4'},{'1','0','0','4'}}; [/code] However, this code does [B]not[/B] accept 2 digits..only one. This irks me, and I was wondering if there was a way to add 2 digits. [COLOR="Red"]Note: I am going …

Member Avatar for jonsca
0
114
Member Avatar for restrictment

Is this even possible? Or do I have to make the user download the program before they can use it.

Member Avatar for jonsca
0
122

The End.