Beginners - February 2016 (Page 30)

Does anyone see my errors?
 
my errors are: program2.cpp:70: error: ISO C++ forbids in-class initialization of non-const sta ...
[5 replies] Last: The initialiser of a constexpr object (of a literal type) is evaluat... (by JLBorges)
Need help with this program
 
Okay so the description says: for a given number write all sums of consecutive numbers. for example,...
[5 replies] Last: Try having a variable outside the loop which you can aggregate the sum... (by TwilightSpectre)
Sorting not working
 
Hello :) I am making a simple program to accept the details of 3 students and to print the values as...
[5 replies] Last: Oh, sorry then. Different compiler, compiling on almost highest level ... (by naaissus)
by jp003
Need some help
 
I am unsure how to clean up this code the way it needs to be. This initial version of the progr...
[1 reply] : You didn't show us the new Song type so I have to guess a bit. I woul... (by Thomas1965)
Editing Existing Data
 
Hi guys, still new to C++ programming here but I am trying to copy an existing data from a text file...
[1 reply] : #include <fstream> #include <string> bool copy_file( std::string src... (by JLBorges)
Undefined reference to function.
 
Hello Everybody! This is my first post here! Please be gentle ;) I am including a header file from ...
[4 replies] Last: Thank you very much cire! I'll generate the libraries then. (by Silverwhale)
Basic c++ program problem
 
This program is supposed to act as an ATM, but the problem I'm running into is whenever the user inp...
[4 replies] Last: You can put the part that asks for action in the loop and than execute... (by etrusks)
How to make it so you HAVE to insert the choices given?
 
So the player needs to say whether they will attack "head" or "body" how would I do this? Like you ...
[1 reply] : cout << player1 << ", where do you strike?" << endl << endl; cin >> c... (by naaissus)
Difference in Style and Organisation
 
I have seen many code written as below: public: // (default) constructor dumb_array(std::s...
[8 replies] Last: Ok it sounds as though you are doing well, good luck in your future en... (by TheIdeasMan)
Help convert degrees to radians
 
Hi, I need some help writing this small function. It's supposed to accept a double value as degrees ...
[4 replies] Last: See http://www.cplusplus.com/reference/cmath/fmod/ (by helios)
if/ else if statements
 
This is for a CS homework assignment. When I run this program, for the first cout statement that say...
[1 reply] : Your question is unclear to me, however the reason it's displaying 0.0... (by TarikNeaj)
by rantiv
INVALID SLOT
 
I need to make an "INVALID SLOT" show up when a wrong input is entered in the single drop and multip...
[no replies]
Functions
 
Hi all, I wrote this small piece of code, after executing the code I had this output: Inside ...
[2 replies] Last: http://www.cplusplus.com/forum/beginner/182122/ (by helios)
by tNK
Question
 
Hey everyone just a quick question. Say I have a integer variable that I will be using to store s...
[3 replies] Last: pnoid but what I'm trying to accomplish is for the program itself to d... (by tNK)
by Haziq
Basic C++ problems
 
1. If my i=0, i get a correct input for pre_date as a start but when i increased the i, weird output...
[no replies]
How to determine the min and max values from a list of numbers in a txt. file
 
How do I determine the min and max numbers from a list of numbers in a txt file?This is what I have ...
[2 replies] Last: Holy Smokes Thanks so much for your help. I/we got it to work. (by a1ckunze)
Bid Tool
 
Good afternoon guys. I'm on working on an assignment about pointers and dynamic memory. This is wha...
[no replies]
by ristic
Allocated pointer set to NULL
 
Hello there. I've got a question. So here is what i have: // in .h file static Class** vektor; ...
[6 replies] Last: I'm a little confused here. Your example code shows delete and the ... (by cire)
Calendar Program Offset
 
Hello, I'm working on a Calendar program that will display the calendar for any month during any yea...
[7 replies] Last: @jaykeblakk Can you explain to me why my way isn't working, and this ... (by whitenite1)
std::sort comparison object
 
Hi, as always I was doing an exercise and faced huge error message when I was trying to sort vector...
[2 replies] Last: Dude you are genius :) Thank you! I have to start spotting these thing... (by etrusks)
February 2016 Pages: 1... 2829303132... 46
  Archived months: [jan2016] [mar2016]

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