Beginners - September 2016 (Page 3)

Array
 
1.Rewrite the program on cumulative final grade. This time: a. use rectangular arrays. b. Use array...
[5 replies] Last: Line 16: sn is undefined. Since you can calculate grades for 5 stud... (by AbstractionAnon)
Function uses like this
 
Hey guys so I've been wondering why don't people do this all the time: #include <iostream> templa...
[2 replies] Last: Thanks for the great answer! I also do this when I'm testing out my p... (by boost lexical cast)
Review HW Code If I can make it simpler?
 
I believed I did this correctly. But I have the tendency to over think things. Just wanted to know i...
[7 replies] Last: For studying purpose, there is no problem with using namespace std; .... (by SakurasouBusters)
I don't understand: "friend std::ostream & operator<<(std::ostream & out, const Hour & h);"
 
I have to define methods of a given class: Hour.h ... class Hour{ public: Hour(); friend...
[2 replies] Last: > I'm not sure what ostream is or why he's needed. https://msdn.micros... (by mpark4656)
Build Error from changing cout string
 
I'm not even sure I stated the title right. I just started a tutorial series to learn C++. I'm using...
[10 replies] Last: Lol ok. Thanks. (by sakers288)
If the age is between...
 
Hello everyone. I need help putting "if age is between 17 and 42" in code form. I know what to put f...
[1 reply] : if(age >= 17 && age <= 42) { // Do something... } (by SakurasouBusters)
Data type conversion int to double within function
 
I'm in my first programming class and am having a little trouble understanding what I should do. I e...
[7 replies] Last: Lets say that you have thousand files in your program code and million... (by keskiverto)
Getting part of string in CSV file and converting to int
 
I'm trying to do math with some of the information in two different CSV files, using C++. Right now ...
[3 replies] Last: think about vfscanf to analyze and transform the line ReadStuff ( p... (by CptJY)
I want my entire program to run again but my loop is won't work the way intend it to
 
Hi! :D program runs but one problem is the loop, what i want is for the entire program to run again ...
[6 replies] Last: Y is not 'Y' ! Y is as variable 'Y' is the caracter. Add single quote... (by CptJY)
read-only error with string
 
Maybe someone can help me with this. I reduced the code a bit: int main(){ //The main string to...
[5 replies] Last: You could also replace the loop in your replace function with a ranged... (by jlb)
Print Spiral with 2d array
 
I'm currently working on an assignment where I'm supposed to create a spiral using a 2d array of int...
[4 replies] Last: I edited both so they work without any command line arguments. I do se... (by FredDilb)
Sentinel, Query, and Looping Control: Can't Compile
 
I'm working on an assignment for my class, but I can not get this app to run, because there are erro...
[5 replies] Last: To anyone who finds this thread, this was my problem: I had an extra ... (by CobaltThunder)
tokenizing issue
 
I am writing a program for class which takes an expression as input and then prints out the numbers ...
[6 replies] Last: Thanks krako! Looks like stringstream was the way to go. (by hornet7288)
Returning a pointer to dynamically allocated memory from a function
 
I need to dynamically allocate memory in a function and then return a pointer to it. Could someone v...
[4 replies] Last: "duplicate" is a common non-standard function called strdup() . https... (by Duthomhas)
Help with command line
 
I'm trying to pass argv to a function but since I have argv defined as char* it will not let me as...
[2 replies] Last: Thank you! (by chocoluve)
command-line argument error
 
Write your question here. My code is giving me the error "a function definition is not allowed here ...
[2 replies] Last: sigh thanks mate (by chocoluve)
looping in array with class names
 
I'm trying to use a loop to load an array from a file with strings and ints. Additionally while it ...
[2 replies] Last: line of string (first name) line of string (last name) int (year) int ... (by nyork3415)
Floor function
 
Hey guys, trying to write a program using the floor function that outputs a whole integer, rounded t...
[3 replies] Last: Hello my2jlw3s, During my dinner break I realized that rounding to th... (by Handy Andy)
by mmcro
Unable to return value from while loop/Issue with array
 
I need to find the amount of digits that make up a user inputted value. I then need to use that numb...
[1 reply] : int getDigit(int num) //This function finds how many digits are i... (by SamuelAdams)
C++ program to read n numbers and print the second largest number
 
Is this correct? #include <iostream> using namespace std; main( ) { int n, c; float v, ...
[3 replies] Last: 1. Read 'n' numbers: while (std::cin >> n) [CTRL-Z] to stop reading 2.... (by Boilerplate)
September 2016 Pages: 12345... 34
  Archived months: [aug2016] [oct2016]

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