Beginners - July 2012 (Page 2)

Looping issue
 
I'm making a nooby program and im trying to loop code, so like when you say yes to something and you want it to go back to a certain line, how do you do so?
[2 replies] Last: While(something is true){many lines of code}, for(something initializ... (by Onigato)
RC Filter Please Help!!!
 
void Filter::getResistor() { double res; double tol; cout<<endl<<"Enter resistor's resistance: "; cin>>res; cout<<endl<<"Ente...
[2 replies] Last: I have resistor defined in my Resistor.h file. //Resistor.h //Progra... (by treyriggins)
Regular Sort of my Netpay
 
So I'm digging deeper into my payroll program and learning new things as I go. Last thing I did was find the average netpay of my employees from my input file ...
[6 replies] Last: Figured it all out guys here's the finished product: #include <iostr... (by LaC0saNostra)
Really simple code is getting a wierd error
 
So im coding using xcode ( i know i know i know, i shouldnt use xcode but i am and i will continue to do so for now ( why? cus i want to and i like it like that...
[2 replies] Last: I figured it out! I apparently had accidentally enabled a breakpoint t... (by ryanvkeller)
by Doth
Nested class question
 
I was once making a text based game to take a pause from learning. I made a class Character to represent the player, the class included methods (Attack,Defend,g...
[1 reply] : This works even if Item is private: class Player { private: class Ite... (by Peter87)
inheritance question
 
What I want to do is take a predefined matrix class (ideally from Boost.matrix) and use inheritance to make a pseudo custom matrix class. What I have for sta...
[3 replies] Last: Ah, thanks for the changes naraku! That did the trick and it compiled... (by Glen Jenness)
Declaring String Array
 
My compiler is giving me a handful of error on just this one line. I have used this technique before without any problems so i am a little confused. Any suggest...
[4 replies] Last: thank you guys, i figured it out (by i2Fluffy)
by Aikawa
How to do it this function question?
 
A function called sumofSeries that takes two parameters, the numbers x and n, and find the sum of the first n terms of the following series: x+(x +x 2 )+(x +x 2...
[2 replies] Last: Maybe easier to think about it like this: x = 2, n = 4 (2 1 * 4) + ... (by Lowest0ne)
by Aikawa
I'm stuck at array's question
 
Answer the following question regarding an array called dArray (for part a,b,c). (a) Declare a two-dimensional array named darray of 6 rows and 8 columns of...
[1 reply] : Hi there, [quote=Forum Rules]Don't post homework questions Programmer... (by closed account o3hC5Di1)
by Aikawa
How to do this complicated question?
 
In the 13th century, the Italian mathematician Leonardo Fibonacci—as a way to explain the geometric growth of a population of rabbits—devised a mathematical...
[2 replies] Last: Hi there, Please post some more specifics on what it is that you stru... (by closed account o3hC5Di1)
by Aikawa
I stuck at this basic question?
 
/* * File: Anonymous.cpp * ------------------ * This program doesn't do anything useful and exists only to test * your understanding of method calls and...
[1 reply] : (a) -> prototype is line 3 and 4 definition is at line 10 and line 16 ... (by HiteshVaghani1)
by daniya
QUADRATIC FORMULA CODES
 
hello, am new in c++, i have tried to code the quadratic formula but surferring from several error. please can some one put me true?
[6 replies] Last: Thank you. I now understand. (by daniya)
getline(cin, string) is giving me a weird glith
 
Pretty much I am asking the user for how many people are playing. After that I use a vector to make a class for each player. I then ask them for the name of eac...
[1 reply] : When executing this line: cin>>num_players; the program skips le... (by Cubbi)
by Zu007
how to make additon function(for char)
 
i'm wanted to make addition function for ma class. #include<string.h> #include<iostream.h> class string { private: char str ; int a,b; public: g...
[3 replies] Last: Dev-C++ or Turbo C++ strikes again :( (by Moschops)
System Programming with C:Questions
 
Hello all, I am now following the PPT from my gf's c++ class and trying to do the last homework. Basically it involves creating my own shell.I have completed co...
[6 replies] Last: int pid = fork(); if( pid==-1 ){ perror("fork"); return 1; } if... (by ne555)
Need help with ARRAYS please!!!
 
I am trying to write a program that uses arrays and this is my first time. You have an index of 100 and then as long as you dont enter -1 the program will conti...
[1 reply] : What's wrong with the answer you got in your other thread? (by Peter87)
memset() crash
 
I got 2D array(50x50) of structs: PathfinderNode** PathfindingGrid; struct PathfinderNode { PathfinderNode* pParent; sf::Vector2i Position; int...
[4 replies] Last: - I thought of that, but there is a performance overhead - Grid dime... (by closed account 10oTURfi)
Program using void functions
 
Hello. I am trying to learn C++ and I am making a program that turns phone numbers into words. For example, if the user inputs '4384357' out pops 'GETHELP'. I a...
[17 replies] Last: Two comments: 1) Why did you take out the switch statement? 2) You... (by AbstractionAnon)
How can i pass an entire Array into a function parameter by value? (no pointer/ref pass)
 
C/C++ Language in g++.I want to pass an entire Array (2D or 1D) into a function by value without passing its adress.And return it in the same way.Like we do wit...
[5 replies] Last: Here is some example of it.. i learnt from there so i think that may ... (by HiteshVaghani1)
Need some assistance using vectors with classes
 
Pretty much I have a game where I want the user to enter in a number of players playing against each other. The game is turn based and I'm having trouble. This...
[3 replies] Last: Oh, sorry for that, I made a mistake in the name of your class. It sho... (by KRAkatau)
July 2012 Pages: 1234... 54
  Archived months: [jun2012] [aug2012]

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