Beginners - February 2014 (Page 5)

Can anybody help me with this exercise?
 
I have no idea how to deal with it.. And it's suppose to be about the use of "functions". I'd really appreciate your help!!  You are required to write a...
[2 replies] Last: You are the boss!! Thank you!! (by marcusrzheng)
by AndreC
Update class data from struct
 
Hello, I'm trying to learn c++ and came across a doubt (one of many, but yeah...). It's about the usage of struct... Ok, so this is the general idea of wh...
[1 reply] : YOu should look into inheritance. for example: #include <iostream> #i... (by MiiNiPaa)
by jidder
Reading line by line Stringstream
 
I just want to get each line back from the command line. So i copy the output into the stringstream. But then i need to convert each line into a string to sea...
[4 replies] Last: > I thought about doing it this way but im ending up doing this a lot ... (by JLBorges)
Passing struct as argument into class?
 
Hey everyone. I'm having a problem passing my struct into my class member function. I feel it's redundant to have a structure in both the class and the main pro...
[8 replies] Last: JLBorges, you are an awesome person! Turns out the different files wer... (by Notamongsheep)
by Huppa
Checking for incorrect input?
 
How would I check for incorrect input? (ie. if the result is not 1, 2, or -1 to quit. Output = result << " is an incorrect input.";) while (result !...
[1 reply] : Hi @Huppa, this is an example using do-while and while loops i think ... (by eyenrique)
Why does the random function output in sequence
 
So in the code below when I run the program the random number is outputting in sequence. Meaning every time I press run, I get 3, 6, 8, 12, 19, 2, 4, 7 (out o...
[9 replies] Last: @AceDawg and @chief why are you two seeding multiple times? You should... (by giblit)
Constructor and Destructor C++
 
Hello, I am writing few lines of codes for my project and I am not sure how to approach this problem. The instruction says: Add a function call loadDocum...
[no replies]
What is a vector?
 
What are they even used for? I see people using them all the time in this forum and I could never really figure out what it is. Any help?
[5 replies] Last: Oh, now it makes sense. I should probably learn how to use them now... (by AceDawg45)
Trouble with carrying value of variables
 
I'm working on a program that finds the area and circumference of a circle using the radius input by the user. I'm trying to get the value of the radius to be ...
[7 replies] Last: Thanks for all your help guys, I appreciate it. It really helped clar... (by BlackNapalm)
Temple of Hanoi
 
Hello, so I have this temple of Hanoi program which works fine, I just don't know how to code in a count to keep track of steps taken. I tried starting a count ...
[5 replies] Last: Hey so i tried that, but it kept outputting the wrong number of steps.... (by bbunn77)
by Huppa
Help with counter
 
How would I add studentCounter to count while 1 and 2 are input? //examgrade.cpp #include <iostream.h> #include <iomanip.h> #include <conio.h> ...
[8 replies] Last: @Huppa give it an initial value of anything besides -1. so maybe int ... (by Huppa)
simple progam --- why is there a segmentation fault?
 
I have a simple program that reads in this file and bins the data to make a histogram. The data are written to an output file. I get an unknown segmentation fau...
[4 replies] Last: Thanks! (by adamsheimat)
Deleting a string with a destructor
 
I am trying to delete the string str in the deconstructor, but when I do that, I get an error. So how do you delete a string in the deconstructor. I have tried ...
[13 replies] Last: Just to make sure, it should be [code firstline=7]Line(string str1 ){ ... (by long double main)
Making sorting function
 
I have to create function with sorts array. I have to give array, lenght of array and direction from low to higher and vica versa. I have to make sorting functi...
[5 replies] Last: Thanks you guys. (by Townsheriff)
Reading a text file using I/O -- Line by Line
 
Hello, I need help ASAP figuring out how to fix my problem with reading a text file, line by line, and stopping on each line, ended by a -1 (sentinel-contro...
[no replies]
&& and || in a while loop
 
Hey everyone. First post here. I am new to programming and C++ so please be gentle! I am approaching with respect of your expertise and I truly appreciate an...
[5 replies] Last: Ok - so to clean this up and solidify my understanding, here we go: ... (by truhland)
First time using if and else, please help?
 
I've made a program which when the 'if' and 'else' statements are used, here's the code...The output is almost working, when I input 'no' it displays 'bad' as i...
[8 replies] Last: the reason it's not working is because cin >> response only takes inpu... (by geniusberry)
Cents into Dollars using a Function prototype
 
My program is almost done, but when i try to convert a number into cents, it does not calculate the cents properly. So if i enter 325, it says i have 3 dollars ...
[9 replies] Last: Congrats! main function should print out the dollar equivalent You... (by wildblue)
Vectors
 
Howdy, I am the beginner in C++ . I need to write a program which will sort a vector into two vector which will have name odd and even numbers . The size of the...
[3 replies] Last: Here's the issue: arraOdd[oddSize++]=array ; is going out of bound... (by unsensible)
C++ for application design?
 
Might be a bit off topic for this area, but how is C++ at developing applications for iphone/ipad or android?
[1 reply] : http://programmers.stackexchange.com/questions/127735/android-developm... (by MiiNiPaa)
February 2014 Pages: 1... 34567... 60
  Archived months: [jan2014] [mar2014]

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