Beginners - April 2012 (Page 56)

by jc82
overloading operator <<
 
Hello all, I'm a C++ rookie learning about operator overloading so bare with me here. I am trying to find some help on how to use the overload operator << in wa...
[6 replies] Last: iHutch105, I am sorry that I did not pointed out why your code is bad.... (by vlad from moscow)
Matrix multiplication
 
Hi all, I have a question concerning matrix multiplication. The following code is the way I would do it (the example is just for 3x3 matrices). int ...
[4 replies] Last: I don't know how this class should help me decide which method is bett... (by HomesickAlien)
Set Class - Copy Constructor error
 
Hey, This is my first post on any forum so please try to bear with me. I've run into an error with my copy constructor. Actually I think the problem is somewhe...
[3 replies] Last: Cool. Good stuff. :-) (by MrHutch)
by Brett
What is the problem on below program? about pointer
 
int foobar( int *pi) { *pi = 1024; return *pi; } int main() { int *pi2=0; int ival = foobar( pi2); return 0; } I am a beginner and not famil...
[3 replies] Last: Yes. That will work. You'll notice that after foobar is called, bot... (by Disch)
toUpper error
 
Here's the segment of my code: void main() { char choice; do { double WholeSale = GetWholeSale(); double getMark = GetMark(); double catch...
[1 reply] : Try: choice = toupper (choice); Function calls are case sensitive.... (by Stewbond)
Storing input numbers in an array and displaying them
 
I need to prompt the user for an arbitrary number of integers while using zero as a sentinel. This program accommodates up to 100 numbers. When the user enter...
[1 reply] : @redscout You have your for loop, written wrong. It should be: for (... (by whitenite1)
by Cman87
Object pointers
 
void function(A *objA); -> function call : function(*objA); the function takes an object pointer. But when we call the function we pass the dereferenced poin...
[2 replies] Last: Okay Cubbi thanks for the comment. But what is the difference between ... (by Cman87)
how to speed up stdout?
 
hi, any one knows what i need to do to make this code work faster for(j=0;j<1000000;j++){ printf("%d \t",j); } its taking 15,023s. my goal is to m...
[13 replies] Last: static char buffer[1024*1024*4] ; // implementation defined :... (by JLBorges)
Number Guessing Game
 
I am a student studying computer science and I have this as first assignment, the computer as to make guesses for the secret number. Hopefully someone can help...
[4 replies] Last: hey guys don't worry about it, i have done the program using rand and ... (by molia2991)
struct program help
 
int short i have a lot of errors involving my variables not being declared right also i am not sure if my function void fixDouble is set up correctly i have a...
[1 reply] : Variables have scope (by ne555)
C++ multi file classes
 
I have an assignment and have got most of the first part do. There is a part however, I am having troubles with..I am not sure what she is getting across for th...
[7 replies] Last: Did (by closed account 2EURX9L8)
by Ch1156
Cant use if with rand()
 
I am trying to make a program where you are given random numbers and you need to type in those random numbers and then it will output you a message but it wond ...
[2 replies] Last: http://www.cplusplus.com/doc/tutorial/basic_io/ Look for stringstream... (by GRex2595)
Returning an Array
 
Hey guys, I have to write a function that generates a 3 x 3 matrix. Generating the matrix is simple enough but i can't figure out how to return a 2d array. ...
[1 reply] : create a Matrix class (or use one from a well-known library, such as b... (by Cubbi)
Vectors
 
Where can I find the page that teaches about vectors?
[2 replies] Last: In Accelerated C++, it is chapter 3.2.1 "Storing a collection of data ... (by Cubbi)
Function & String help
 
How would I go about defining a function to compute the roots of a QE when supplied with 3 coefficients?
[7 replies] Last: Use a void function and use the address of operator '&' to change D, D... (by GRex2595)
Just a few questions please answer
 
Hey, i was just wondering if c++ was the right language for me... I like writing simple programs and fooling around with featues. Im only 14 and i want to be a...
[1 reply] : I started learning c++ at your age. first answer: You cannot make mine... (by S G H)
Need a quick explanation of this statement
 
length = ( length < LENGTH ? length : LENGTH - 1 ) I remember reading about the ? but can't remember what it meant in this context and can't seem to find it ...
[2 replies] Last: cool thanks (by jokerfwb)
by sakilo
vector output problem
 
hello everyone, I have encountered a problem using vectors. In this program I am trying to create a vector that contains degree values ranging from 0 to 90 in s...
[3 replies] Last: ahh that makes sense thank you =) (by sakilo)
Functions Problem, Help?
 
I have to code for functions. 1. GetWholeSale() - ask for user's whosale, validate, and return 2. GetMark() - enter markup, validate, and return 3. CalculateRe...
[no replies]
Issue with Ordered Link List
 
I have a program that is supposed to read integers from a file and then create a link where the numbers would be in the correct order. If the node all ready ex...
[4 replies] Last: That worked, thanks so much for your help. I really do appreciate it. (by apeachaday)
April 2012 Pages: 1... 5455565758... 66
  Archived months: [mar2012] [may2012]

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