Beginners - October 2015 (Page 3)

Saving multiple inputs into array
 
Hello all who read, I think it goes without saying that I am new to C++. The code below is a smaller part of something I am working on but need to fix this bef...
[1 reply] : you need to access each array element to write some data there. for... (by EloMelo)
Simple function to split strings
 
I'm having a ton of trouble attempting to split a string using C++ string operations and looking at similar code is not helping because they all use string stre...
[1 reply] : Please help... (by cluelessnoob)
I have a problem with the getline function
 
I'm trying to use the getline function, but it skips the first option for some reason, I don't know why. Can anyone help me please? Thanks in advance! /...
[7 replies] Last: But this helped tons! Totally solved the problem I had thanks! (by Toothless LL)
Files problem
 
A problem with files - it's not inputing the way I want.. First run the code with teacher, write the test. I did "What is 1+1" and the answer I put "2" The...
[6 replies] Last: I inputted the lines from the file, (I changed it to getline) but it s... (by Toothless LL)
Problem with getline
 
I have a problem with the getline. Here's a picture of the problem https://41.media.tumblr.com/865c79247a91e094a36697bb75c43320/tumblr_nx1rz3JQG21qdp21xo1_12...
[no replies]
How can I call an overloaded class member function with const qualifier from the nonconst one?
 
Hi, I got a question here. When I created a class using some sort of member functions, I could hardly distinguish the constness between overloaded ones. For exa...
[2 replies] Last: Thanks, it works. Actually, it is weird to add a const then cast it of... (by duke2015)
Struct/Function error?
 
Gives this error: In function 'int main()': 13:18: error: too many arguments to function 'void printE()' #include <iostream> using namespace std; void...
[2 replies] Last: That error was the old name I tried rehanging the name to something el... (by rabster)
string to char to string
 
Why doesn't it print "BCA" ?? How to put "BCA" in b? Thanks #include <iostream> std::string a,b; int main() { a= "ABC"; b= a + a + a ; ...
[2 replies] Last: thanks it works! (by vindiou)
call superclass operator+
 
Hi there! I know this is maybe a very stupid question, but how can I call the superclass operator+ from the subclass operator+? This is an example: ...
[1 reply] : how can I call Base operator+ Base::operator+( nameOfVariable );... (by Peter87)
Beep command basics..
 
Hey all, Didn't know which forum to post this in as it may not be language specific and just its limitations.... The system beep command works well in my win3...
[2 replies] Last: Just running a few tests, it seems that only notes C and D seem to do ... (by hardwired)
.
 
[1 reply] : all of the code you have given us is pretty meaningless to your object... (by Jaybob66)
Greatest value in an array?
 
I'm not sure how to word this but how exactly do I find the greatest value in an array. I have some idea but help is needed. #include <iostream> using ...
[10 replies] Last: Wow thanks man, I was using visual studio 2015 as well and it never ga... (by rabster)
Array Bug! PLEASE HELP me for my 1st Semester project.
 
Try to compile this code, there's a bug. When I input "10" as my "Limit", the array will exceed up to 11 and so on. And also, when I choose ascending, in the en...
[14 replies] Last: for (c=0; c<limit; c++) { cout << "Enter number " << c+1... (by closed account 48T7M4Gy)
Remove a specific object from an existing list of object
 
I have a class called WeigglhBridge which has one of this method named removeTruck(int). The class I mentioned above has an account object named Truck record...
[10 replies] Last: This won't run on main properly in the main.cpp once I have more than ... (by PhillipK)
NEED HELP WITH A QUESTION OF LOOPS
 
HEYY EVERYONE I HAVE AN ASSIGNMENT TO SUBMIT RELATED TO LOOPS AND I HAVE NO CLUE HOW TO SOLVE IT IF SOME ONE CAN HELP THAT WILL BE REALLY GREAT Suppose we ...
[2 replies] Last: Write a program that: 1. inputs the purchase amount of dirhams and ... (by closed account 48T7M4Gy)
Program execution after exception is caught
 
I have one fundamental question when it comes exception handling.I have written below program to convey my question clearly.I have written a program to calculat...
[1 reply] : Why programs will execute further even after they catch an exception?... (by MikeyBoy)
Unscrambling words
 
I have a lot of words in a notepad file. And another notepad file consist of a few words from that wordlist but scrambled. I want to make a program in cpp us...
[3 replies] Last: To compare scrambled/unscrambled words, sort both: bool is_same_wor... (by Duthomhas)
Custom namespace
 
Ideasman wrote in another post he uses his own namespace GDA:: I find that fascinating, but I'm wondering what all is involved in making your own namespace. ...
[10 replies] Last: [quote=pearlyman]"Look what I've made"... when I say it, I like to mea... (by TheIdeasMan)
Need some help readjusting program
 
Original:Write a program that asks the user for the name of a file. The program should display the first 10 lines of the file on the screen (the “head” of t...
[10 replies] Last: Then making a const variable instead of a int would avoid something l... (by TheIdeasMan)
costs of c++
 
so i have some basic experience with python and i'm taking c++ courses at my university. I've always used the universities resources so i don't know what costs ...
[8 replies] Last: I agree with Pearlyman, your main goal should be to teach logic, writi... (by SamuelAdams)
October 2015 Pages: 12345... 57
  Archived months: [sep2015] [nov2015]

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