Beginners - January 2014 (Page 7)

Struct to Private Class?
 
So basically, last week our lab was to make a struct, public obviously. Now our instructor wants us ...
[4 replies] Last: Giblit is right about the output function (it is "Tell, Don't Ask"), b... (by LB)
working with nested vectors
 
Hi, I wanted to write a program that used nested vectors. The nested vector would contain the sides ...
[3 replies] Last: Oh wait, I think I get it now. Thanks! (by heyyouyesyouiloveyou)
Can someone compile this for me?
 
I'm trying to make a function that can calculate a number raised to a power, but my console isn't lo...
[5 replies] Last: Actually, 0 0 is an indeterminate form, but in many cases, it's treat... (by long double main)
Separating Interface from Implementation (1,2)
 
Hey guys , I wanted to ask what am I doing wrong here first I tried to separate the interface her...
[24 replies] Last: If the project tab is empty that means you have no project open ;) (by LB)
Nodes with char problem
 
I have a problem inserting char values in a node, i dont know the reason behind it but it doesnt sav...
[4 replies] Last: You can't use == with arrays. If you have char arrays, you can use st... (by Disch)
by pukol
fstream: modify text file
 
I have a program that saves and append data in a text file. This is what a regular txt file would l...
[no replies]
weird input skipping
 
Hey all!, I've made a class with will add fractions, but when I try to loop it in the driver code as...
[3 replies] Last: That works like a champ too, thanks! (by bookLearnin)
next word of input
 
I'm curious about reading in a line of input until certain words are reached and then saving the NEX...
[10 replies] Last: So this is what I have before even formatting output. #include <iost... (by heroicJ)
by jwilt
function problems
 
the program works fine when I comment out my "larger" and "smaller" functions, but when I try to use...
[3 replies] Last: Yeah changing it to I worked, Thank you! (by jwilt)
by MRich
Connect 4 Dropping Pieces
 
Hello, I am trying to write a program that resembles the Connect 4 game. One problem I'm having is ...
[3 replies] Last: It should be: for(int i = (WinSize + EXTRA_ROWS) - 1; i >= 0; --i) ... (by yulingo)
by jwilt
infile problem
 
when I read from the file I can not get a string to output. instead it skips the place the string sh...
[5 replies] Last: passing by reference worked. and I have not been taught pointers yet. (by jwilt)
frequencies in vectors
 
I am writing a dice game that rolls a dice randomly according to a users input of 1-10000 going into...
[6 replies] Last: std:: just tells you where it comes from. He's explicitly stating tha... (by Stewbond)
by donjon
Difference
 
Hi! I'm new here... And i'm new in cpp programming! I'm sure you can help me here.. I do not und...
[2 replies] Last: Hi! Great response, thank you very much. Cheers (by donjon)
how to transform a program into a call by reference
 
Hi, last time we had a homework where we should create 3 functions, one that fills an array (2d) ran...
[3 replies] Last: Here: int Array ; {for (int i=0; i<M ; i++) for (int j=0 ; j<M; j... (by Avilius)
Changing double to int using casting
 
double newnumber=234999 int temp=(int)newnumber; cout<<temp; when I output temp I get 2349...
[3 replies] Last: Thank you...I hadn't thought about that! (by eman2013)
Where is the Syntax Error?
 
Hello there, i'm starting my first C++ class and i'm having trouble finding the logic error and synt...
[8 replies] Last: Hey thanks for all the help, I have my program working now, it may not... (by polarbear22)
Random arithmetic answers.
 
I'm pretty new to this, and I'm trying to make a simple quiz game. My code is compiling and running ...
[3 replies] Last: Moved it to line 39 and it worked, thanks a lot guys :) (by Wolfej1994)
by alsade
memory lick
 
can some one plz tell me why theres a memory lick here?? #include <iostream> #include <string> us...
[4 replies] Last: To add on to what LB is saying... you should only delete what you all... (by Disch)
validating a string variable
 
I would like to make a simple function that accepts a string variable and tests it to see if it's in...
[2 replies] Last: I didn't realize that, thanks alot! (by bookLearnin)
by alsade
how to intialize char array with class method
 
i have a class employee which contain char array like showed in the code: class employee { char ...
[1 reply] : Maybe something like this? class employee { char name ; unsigned i... (by Avilius)
January 2014 Pages: 1... 56789... 44
  Archived months: [dec2013] [feb2014]

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