Beginners - October 2017 (Page 16)

switch statement with basic math problem
 
The issue i am having is initializing the math problem. cannot use string or if. must be able to jus...
[6 replies] Last: Your second switch is floating in vacuum. Clearly, the switch at line... (by closed account DoLCX9L8)
size of memory on the heap
 
Hi guys so after a bit of googling I have found that there is pretty much no way to find the size of...
[2 replies] Last: Hello adam2016, Line 9 When you create the array with new you know th... (by Handy Andy)
Declaring function from one cpp file to another
 
hello, simple stupid question, for pros, i have 2 cpp files, 1 has a function, the other is the main...
[3 replies] Last: If it's two ints: int Adding(int, int); If it's a string: void ... (by closed account DoLCX9L8)
by laenos
help with a function
 
I have to write a function to count the number of students who scored Y marks in GPA. The result sho...
[4 replies] Last: Now I understand because it does not work. Instead, if you wanted ... (by laenos)
Help with Comparing Two Input Streams!
 
Delete!
[11 replies] Last: remove the edit button. (by ne555)
by RNBW
String Arrays
 
I am struggling to get my head around this problem. I want to prompt for say three responses (let's...
[9 replies] Last: @jlb Thanks for your help. Now to read up on vectors! (by RNBW)
Iterate through a vector
 
The function should iterate through the vector listAccounts of type Account. And if the account_name...
[2 replies] Last: Thanks! So I did that, and I got "0 accounts to check" Is this a pro... (by runrabbitrun)
how to overload the plus operator ?
 
I keep getting the error too many parameters for this operator function. #include <ios...
[8 replies] Last: you can try it out with my code. OK, here goes: #include <iostrea... (by Chervil)
out of bounds in game
 
Hi guys I made a game in which you can move up down,left and right in a console the X is the current...
[8 replies] Last: @lastchance nice spot =) changed the random numbers, thanks (by adam2016)
how to sort rectangle by area in descending order ?
 
I am trying to write a code that sort rectangle by area in descending order. For some reason when ...
[1 reply] : How do you know that? Where do you print the sorted vector? (by keskiverto)
question mark at end of for loop
 
Hello everyone i'm trying to figure out what is the use of the question mark (?) inside the bracket...
[1 reply] : See Conditional ternary operator http://www.cplusplus.com/doc/tutori... (by Chervil)
Creating a bunch of preset combos of settings in a class
 
I have a simple class and I would like to create a bunch of value presets so user can easily switch ...
[no replies]
Getting averages from data from txt file
 
I have been given a text file that contains 365 lines, 1 number on each line. Each number is the amo...
[2 replies] Last: There's no need to look too far ahead. Build up the code in stages. ... (by Chervil)
Need help with Machine Problem!
 
Below is the exact description and requirements needed for my machine problem. Below I have attache...
[2 replies] Last: else if (profit > max_Profit) { max_Profit += profit; Ouch!! ... (by lastchance)
by chuvak
Validating phone numbers
 
Say I have an array, long long phoneNumbers = { 1416123456LL, 14161234567LL, 1416234567890LL, ...
[2 replies] Last: Something like this: #include <iostream> bool valid_phone_number( lo... (by JLBorges)
mergefiles code behave badly
 
I cant understand what is happening and why it is not letting me enter more lines #include<ios...
[4 replies] Last: See: http://en.cppreference.com/w/cpp/io/basic_istream/ignore The 100... (by JLBorges)
by Bopaki
I have created a new project but I still cannot make it to see the list
 
This is the part that gives the error message: #include "listType.h" #include "arrayListTyp...
[4 replies] Last: I think I have posted everything. Please help (by Bopaki)
this-> not working
 
hi guys this is probably a very simple error anyway I am having a problem with using this-> in m...
[4 replies] Last: very good point Andy =) thanks (by adam2016)
2 integers on the same line
 
i want to know how to enter 2 numbers(the inputs) on the same line and separated by space like this ...
[6 replies] Last: yes.Your second method is best as one is clear that he/she is enterin... (by closed account 1vf9z8AR)
by ericM
making a random generator global
 
I have to generate a set of random numbers supported by different distributions. I wish to use the...
[6 replies] Last: Thanks a million. (by ericM)
October 2017 Pages: 1... 1415161718... 33
  Archived months: [sep2017] [nov2017]

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