Beginners - April 2008 (Page 8)

can you sugest some good code for this bad code
 
#include<iostream> using std::cout; using std::cin; using std::endl; int main() { int gradeCounter,grade,average,total; total=0; gradeCounter...
[7 replies] Last: >> It would be even better to not use the ‘using …’ method and q... (by ropez)
accessing address of char variable
 
i have declared 3 vars in my program int a=10; float b=123.4; char c='a'; am trying to print the address of above three vars,for int and float am a...
[3 replies] Last: @gungurthisrilatha Or use printf() char ch = 'a'; printf("%p",... (by guruplus)
new to c++
 
i was installing visual studio .net 2003 but an error occured and says that a prerequisites something like that i don't what to do ....please somebody help me
[1 reply] : You will have to install whatevere is not installed before you can ins... (by closed account z05DSL3A)
Arrays
 
I have a program that I need to get to read an array. I need it to say that if the number is less than 0 cout<< error message other wise just keep going. How ...
[5 replies] Last: With vectors, you should use references: void func (int m, int n, ve... (by rpgfan3233)
Problem? have no idea.....
 
I am in C++ class and this problem has got me. I have no idea where to start. can someone help me with this problem? get me started or just show me what codes d...
[1 reply] : for (int years = 1; years <= total_years; years++) //outer loop { ... (by rpgfan3233)
new here
 
hi i'm new here, i just started a class for C++ and i need a little help. can somebody give an example in a program how to take a 2 given numbers, one as a num...
[6 replies] Last: u coudl do like int a=1; int b=2 int main(){ cout << a << endl ... (by yogurt)
Arrays and Averages
 
Okay, getting towards the end of the semester and this self study course has been interesting to say the least. This weeks issue deals with Arrays and Averag...
[10 replies] Last: Thanks everyone. This works great now and I actually learned somethin... (by oatmeal1201)
by DaFees
Having issues with stacks
 
Hello all, I am new to here, but not so new to programming. I'm no expert which is why I am here to seek help. I'm working on a number converting program which ...
[2 replies] Last: NEVERMIND - DUH! I figured it out, a careful observer would have seen ... (by DaFees)
Two Quick question!
 
1. Can i use... or ill just show it in a code! if (ww==1-10000) So is it possible to range value in if question? if this is not right, is there any oth...
[3 replies] Last: No problem, glad to help. Sometimes the obvious can be very hard to sp... (by Faldrax)
Craps cant get the bet to work
 
ok im doing a dice game and ive came to a problem when i start the game i want the user to be able to quit when they want but i got it to the point where it onl...
[1 reply] : OK, the first problem is the code to check the bet or quit. cout... (by Faldrax)
Simple Keyboard Input Detection Help?!!?
 
Hello! I am trying to write a piece of code that will detect if the user presses the up or down arrow keys and depending on which one they press, call a meth...
[no replies]
Can you choose more than one case ?
 
can you choose more than one case in a switch statement? Or, how can you choose witch dice to keep in a dice game? Say you roll five dice and you need to kee...
[3 replies] Last: @ropez: Not yet sure. Let's see what the original author says! :) (by msram)
operator overloading
 
In binary operator overloading we can send more than one parameter,can one parameter be char array and another be object reference class String { cha...
[2 replies] Last: Note that the declarations in ropez reply are global functions, not me... (by Faldrax)
Exceptions
 
Am new to programming.Am writing program to handle exception in cpp but it is giving undefined symbol try,throw,catch can u people help me out
[1 reply] : You probably either have an outdated compiler, or you have exceptions ... (by ropez)
Using a .sql database to analyze market data? Huh?
 
For my CSCI class, I'm writing a program to analyze market data from an online video game I play. I'm having no problem actually writing it (the traveling sales...
[1 reply] : What kind of dbms does the game use? usually you can access to the ... (by guruplus)
calling up a class that is nested in another class
 
umm, how do you call a class that you have made if it is nested in another one? would it be weapon.longsword to call up what has been put in to this c...
[2 replies] Last: Following on from rpgfan3233, it looks like what you might really want... (by Faldrax)
I need HELP
 
Hi I am taking a c++ class on line and I am really struggling with this self-taught stuff. I have 5 more programs to write before the end of the semester whi...
[1 reply] : Email me at psault@live.com and I'll see if I can be of assistance. I... (by psault)
using registers in a for loop
 
I'm trying to recall how to use a register to increment a for loop... this is an old C thing that I was taught back in the 80's.. If I recall it went something ...
[2 replies] Last: You shouldn't try to second guess the compiler's decisions on how to o... (by ropez)
word count
 
how do i make it so this program will count the words no matter how many spaces? /*****************************************************\ * purpose - cou...
[1 reply] : Try changing at line #43 to: if (Sentence == ' ' && Sentence[size... (by psault)
Dice game
 
hey im doing this craps game and im having a problem win i roll a 7 the message come on 7 still appears and i dont no how to get it off its fine for when i roll...
[2 replies] Last: if (dice == 11) { cout << "Youve lost"; money -= bet; } shoul... (by kaeota)
April 2008 Pages: 1... 678910... 18
  Archived months: [mar2008] [may2008]

This is an archived page. To post a new message, go to the current page.