Beginners - December 2014 (Page 41)

by Immo
Any other newbies want to go through C++ Primer together?
 
I am already fairly experienced with what C++ has to offer, but I'm planning on going through C++ Primer front-to-back to make up for what my university course ...
[no replies]
Seg fault when trying to print names from array
 
So my program is supposed to read in a file in the format name score and store in an array of no more than 12. Tom 30 Jill 87 Scott 98 My problem occurs whe...
[1 reply] : while (myIn && i < maxsize) { //... i++; myIn >> name >> scor... (by ne555)
Word by word header file
 
i want to print messages word by word as like example cout << " My name is Akash" << endl; if i write it then it will show me 'MY Name is Akash' together. Bu...
[2 replies] Last: Thank u ! now i am going to try this technique ! thank u very very mu... (by Muhammad Anim)
How a*=2 work
 
From http://www.cplusplus.com/doc/tutorial/functions/ void duplicate (int& a, int& b, int& c) { a*=2; b*=2; c*=2; } How a*=2 actually w...
[2 replies] Last: Many thanks... (by arodi007)
2D Array Program Help
 
I was assigned to write a program using a 2D array. The code was returned to me with some comments of improvement by the professor. I am unsure how to correct t...
[4 replies] Last: Thank you I have figured out the first question. Does anyone have inpu... (by newbieCPlusPlus1)
by rayb20
In need of immediate help!
 
I cannot figure out what I am supposed to increment in my aHistogram class since it is a vector itself through inheritance, this is the only thing I cannot figu...
[no replies]
When is c_str() needed to open file?
 
I'm inputing data from a txt. file using inFile.open(filename.c_str());. Everything works fine, but I tried inputing the file without c_str(), just inFile.open(...
[1 reply] : You only need to convert it to a c-string if you are not using c++11 o... (by giblit)
Returning a function as a Class Object? Confusing assignment.
 
Hello, I am attempting to do a assignment for my cse class, but I am having trouble with returning a class object into a function. If some one could help me ...
[5 replies] Last: Can you post your code for this? (by sunnyinphillee)
Array Program Help
 
I am trying to create a program that will read up too 1000 non-negative numbers and print out only the distinct numbers, using arrays. (Example: If user enters:...
[10 replies] Last: Sweet, thanks so much helping me through this! You're a life saver! :) (by gabelogan44)
Program that will store 10 input numbers and display highest
 
So, I am in my first beginning Cpp course and I have been grasping it very well up until this point. Arrays/loops. I have been working on an assignment for 3 ...
[1 reply] : You'll use the loop to replace all those individual messages/inputs wi... (by wildblue)
How to traverse vector in class
 
I am trying to find the largest exponent in this vector, but I am getting an error message. The whole program is very long, so I will just post the relevant pie...
[4 replies] Last: Remove line 3 Poly terms; or change line 5 to this->terms.size(); ... (by giblit)
trying to populate an element of array.
 
Hey so I have a black jack program and I'm trying to set up a part if user wants to hit. I have an array for the deck, user deck (hand), and dealer deck (hand)...
[no replies]
by rayb20
Class Implementation
 
Just looking to be pointed in the right direction here, I cannot get my update function to work correctly. It builds but I cannot get it to get the results to t...
[6 replies] Last: I actually accidentally started a new post on this topic instead of ad... (by rayb20)
Why is my program stopping?
 
Hey I have a blackjack program and I'm trying to add a card to the players hand when choosing to hit. But for some reason my function to add a card to hand make...
[3 replies] Last: Hey guys thanks for the responses. wildblue thanks I did not notice th... (by MrBond90)
Organizing data from a txt file into arrays.
 
I'm having trouble opening a file which contains 4 columns of information like this: 628130189 Paul James 92 237698211 Daniel Cook 86 201895...
[no replies]
Is it possible for an int (or any integer type) to have multiple sign characters?
 
Let's say for example you have a program that asks the user to enter a negative number, then the program will store that negative number in a int variable. Is i...
[8 replies] Last: cin.good() You can also just check the state of the stream like if... (by giblit)
How do I write the function defintion for the following
 
Hi, I need to write the compiler generated statement, function prototype and the function definition for the following. I have written the first two but i'm stu...
[2 replies] Last: It's this by the way. :) In >> robj.dollars; In.ignore(); In >> rob... (by Mandee94)
showing private functions and variables
 
okay,so i have two classes that inherit from a third class. when i call from class a,it shows me only the public functions(which is what i want)and when i call...
[no replies]
by Sym8
returning index position HELP
 
my program takes the values from one array and searches for their index position in another array(linear search algorithm). this is an example of the issue im ...
[8 replies] Last: It will still print only one index even if here several copies of the ... (by MiiNiPaa)
by CSC121
Vector Output Help
 
I am to write a program where the user is to enter a 5 or more values into a vector and it will output: *the list of values in the same order as the user enter...
[6 replies] Last: would it be possible to add this code to my existing code and use it f... (by CSC121)
December 2014 Pages: 1... 3940414243... 55
  Archived months: [nov2014] [jan2015]

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