Beginners - September 2013 (Page 10)

Const correctness and mutable
 
I've been reading up on const and mutable keywords, and I have come up with a use case in my project...
[4 replies] Last: bits is not part of Test1's state because Test1 is merely a container... (by cire)
by ihnena
How to put all cout statements together when using if/else if
 
Hello! I'm very new to C++, I've only been learning for about a month. I posted this question earlie...
[3 replies] Last: I feel kinda silly now haha :v (by xismn)
Pseudocode
 
To write a program as a pseudo-code do I just write down in a word document as Prompt and read? Jus...
[6 replies] Last: Thanks all (by evan1991)
by leo255
Need to end program if condition is not met
 
Hi everyone, Pretty simple question here - I just want to end the program if the user doesn't meet ...
[5 replies] Last: I'm not sure what you are asking. The program will always end when it ... (by Chervil)
Functions
 
I have a function called diceRoll() and it itself is working great, but the problem I'm running into...
[1 reply] : Well, each time you type out: diceroll() you are calling the funct... (by Ispil)
string subscript is out of range
 
Alright guys you can see what needs to be done for my assignment in the comment. When i run the prog...
[1 reply] : You're attempting to use a std::string as though it was a c-string. I ... (by Chervil)
Initilization List + Inheritance Assistance/Help
 
#ifndef ACCOUNT_H #define ACCOUNT_H class Account { private: double accountBalance; publi...
[3 replies] Last: ^Thanks for the tip! that solved a good portion of the problems but I'... (by CodeMonkey05)
by ihnena
How to format cout statements when using if... and else if...
 
Hello! I'm just starting to learn C++, so I'm not quite sure what I'm doing yet. For this program, ...
[2 replies] Last: Oh oops, sorry. There you go! (by ihnena)
Polymorphism. adding new functions
 
I have a base class Building. All its functions are virtual. Then I have a derived class named Resid...
[3 replies] Last: Hi there, Let's look at your code: void main() { Residential_Bui... (by closed account o3hC5Di1)
by patieB
char and string output
 
I have written the code for the question below, but i am not satisfied with it . 1 , its just pickin...
[3 replies] Last: Okay i think the logic of that code you pointed out is the which is of... (by patieB)
Increment and decrement operators in postfix and prefix mode
 
I am using Microsoft Visual Studios 2010, and when In input the code: #include <iostream> using...
[4 replies] Last: Thanks again. Thanks, -jumpinmp (by jumpinmp)
Initial Integer won't output after cmath coding.
 
Hi all. I'm having a problem with my output displaying the correct integer. User is prompted to ente...
[8 replies] Last: Good call. Give my brain and eyes a rest. (by CFalkirk)
Algorithm to determine multiples? W/o need for libs or extra includes.
 
Consider the following code. #include <iostream> using std::cin; using std::cout; int m...
[2 replies] Last: Great answer, I was expecting the Modulus to come into play first as i... (by closed account G30oGNh0)
Stack and the heap
 
The stack holds all of the memory that is being used. The heap has access to memory that isn't bein...
[2 replies] Last: Thanks! (by MasterT)
Populating multiple variables with one cin
 
Hi, I'm in the 4th week as a new student in C++ at Central New Mexico Community College. We were sho...
[4 replies] Last: Yes, I think that's a fair way of looking at it. You might say, if all... (by Chervil)
Substrings
 
I am learning sub-string find and replace. I have written a program that does other things besides ...
[1 reply] : Hi there, First off, I'm not sure if your aware, but some of these fu... (by closed account o3hC5Di1)
Request for help with problem involving Strings, Substrings, Delimiters
 
Hello all. I'm new to the language and trying to finish off a lab problem. We are expected to prompt...
[4 replies] Last: The program does now work after adding pos = totalF.find(delimiter); ... (by steviethundr)
by saiz
value of friday
 
what is the value of friday in this case? enum days { Monday,Tuesday,Wednesday = -1,Thursda...
[1 reply] : The fact that you are not willing to simply compile this is completely... (by Computergeek01)
how would I use set fill to repeat a string. like "%_"
 
how would I use set fill to repeat a string. like "%_" cout << setfill ('%_') << setw (35); ...
[1 reply] : Hi there, could you be a little bit more specific as to what your IDE... (by closed account o3hC5Di1)
Variable "--" being used without being initialized
 
Hey, I am taking a introduction to Computer Science and I am having difficult in finding a solution....
[11 replies] Last: Thank you so much NwN i spent a few hours trying to figure out what th... (by canucksfan1)
September 2013 Pages: 1... 89101112... 64
  Archived months: [aug2013] [oct2013]

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