General C++ Programming - October 2015 (Page 8)

COUT display a Forward Slash..
 
Hey everyone, hope you're all ok.. New to this site so hey :) Just a quick simple question for a friday: in COUT how do I show a forward slash? c...
[5 replies] Last: at the top of ur post , there should be an option to mark as solved. (by SOURABH PRAKASH PATI)
(Help)Counting numbers typed
 
Im making a program tha needs to type series of numbers until i enter any negative number or exeed 100 the loop stops and counts and displays the number of time...
[8 replies] Last: #include <iostream> using namespace std; int main() { const int li... (by closed account 48T7M4Gy)
Put the whole value into char
 
I need to put the whole integral value into char from ifstream. (In this concrete meaning char is 1 byte int) But if I put it just into char, it extracts only...
[1 reply] : You could override operator >>: std::ifstream& operator >> (std::ifst... (by fcantoro)
Lo Shu Magic Square C Programming.
 
'• The grid contains the numbers 1 through 9 exactly. • The sum of each row, each column, and each diagonal all add up to the same number. In a program y...
[3 replies] Last: Firstly, is there any reason you're making SUM a macro, rather than ... (by MikeyBoy)
Call by reference
 
This program is supposed to be scoring goals. The first two, eichel and kane are different from the last one, hodgson. A function was added to main called score...
[3 replies] Last: I'm not sure you do understand what it means. If you did, you'd under... (by MikeyBoy)
by a7867
Programming help
 
I need to write a program that reads all the numbers:12 32 43 21 15 45 and displays them on screen and then Extend the program to calculate the average of all t...
[4 replies] Last: You may find http://www.cplusplus.com/doc/tutorial/files/ useful. I'm... (by MikeyBoy)
Recording specific data
 
I am running a continuous programme using an accelerometer and an mbed. So as not to overload the mbed I only want to record data when there is a fluctuation in...
[no replies]
by Winsu
challenge
 
I have got this exercise to do...It's in a website that has a lot of exercises to do ,whoever want to know where it's just ask me... this is the wording.. ...
[12 replies] Last: Hi, Sorry my idea wasn't of any help, I guess it all depended on the ... (by TheIdeasMan)
Calling functions assistance please:)
 
Calling functions in main are getting errors saying too few arguments in call please help. #include <iostream> using namespace std; const int CUPS_IN_A_PIN...
[5 replies] Last: #include <iostream> using namespace std; const int CUPS_IN_A_PINT = ... (by closed account 48T7M4Gy)
next step for C++
 
hi I can say that I have pretty learnt most essential concepts of C++. a) What should I learn next to master C++ b) What to know to extend C++ to work wi...
[no replies]
im having problems in arrays
 
lets say u have int x how to make all the 13 x equal to one value example x = 2 x = 2 x = 2 x = 2 how to do that in one line...
[3 replies] Last: do int x ={1}; Ah, no. That will only initialize x with 1, all oth... (by jlb)
by guru23
Printing 10 numbers per line
 
Hello everyone, I thought about something last night. I want to print 200 random odd integers with 10 numbers per line. This is what I have so far & I don'...
[2 replies] Last: Great way to put it, I've never thought of it that way. Thanks a lot ... (by guru23)
How to test for new line when reading from file char by char
 
Exactly as the title states. I am trying to read in a file char by char but at the same time keep track of how many lines there are and when a new line occurs. ...
[1 reply] : if (ch == '\n') (by cire)
cannot call member function
 
Hey folks, I am getting the following errors when I try and compile this program. prog.cpp: In function 'void setCylinderDimensions(double, double, double...
[2 replies] Last: Thanks a ton mutexe :) (by dorklowski)
Need Help
 
Hi guys i am very interested what is Static Variables ? :/ can you give me a definition and example of it in easy use of English? I know what is Global variable...
[3 replies] Last: You mean the more comments then better? Amount and quality of commen... (by MiiNiPaa)
by bee309
Calendar
 
I want to write a program that prints the calendar for any inputted month of any year. But somewhere along the program, I input today's date (in terms of month ...
[5 replies] Last: (year - 1901)%4; it should be (year - 1901)/4; ... (by MiiNiPaa)
struct: persists in memory if changed in main not function
 
IN the code snippet below: Change add_change_total(Change change) . . . change.nickels=+2000; The iteration in nickels is only "remembered" in the fun...
[15 replies] Last: is there any way to use the scope operator:: ? If you want to refer ... (by AbstractionAnon)
by jsfq
Drywall program using functions
 
I am trying to write a program using functions. I am having trouble with two of the functions. one in question is calculate_drywall. Which is passed two value...
[8 replies] Last: A few comments: Line 14: A function prototype for calculate_sheets ... (by AbstractionAnon)
initializing vector of char * s
 
Hello, I am trying to solve this puzzle: http://www.puzzleup.com/2015/puzzle/?13 to do that, I want to calculate all the possible codes and pass them in a vect...
[3 replies] Last: @MiiNiPaa thanks for the reply. I used std::string instead of char* a... (by istemihan)
Unwanted output from file
 
Hi, I am taking 101 data from a file and directly printing it on screen and expecting output like this num=1 name=name1 type=type1 num=2 name=name2 type...
[8 replies] Last: Thanks.... How do you know so many cool stuff?? (by shadder)
October 2015 Pages: 1... 678910... 27
  Archived months: [sep2015] [nov2015]

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