Beginners - December 2016 (Page 27)

size of vector made of struct
 
I am having trouble find the size of the vector because it is made of a struct. My program is looking at the total size of the vector and going too far. How can...
[3 replies] Last: Please explain why you think you need to divide pVector.size() by 4? ... (by AbstractionAnon)
Text manipulation problem
 
I have this done to where you enter any text you want and it will be revealed by a spinner. I have two problems: 1. When it's done, I can't figure out how to ...
[4 replies] Last: Applied one suggestion and added an if statement to correct the spin p... (by TimmyFangs)
Undefined Reference Error in class
 
Why am I getting this error? When creating a class object array, similar to this it has worked before. Is it because of the loop it is in? or something else? Ho...
[2 replies] Last: silly me. Thank you (by Carter205)
Sort the names alphabetically by the Insertion sort?
 
Sort the names alphabetically by the Insertion sort?
[no replies]
It does not work
 
...
[2 replies] Last: On lines 10 and 12 any particular reason to print the memory addresses... (by gunnerfunner)
Classes, objects, points
 
I have this homework question that reads as: 1. Write a Class called Point: a. It should have a set and get for points (x,y). b. This class should have a fu...
[7 replies] Last: Yeah, it's a start and not the complete deal. You need a getter for t... (by HumCH12)
Class Programing/ Date Program
 
Hello: Any assistance is really appreciated. I am working on a program using classes (first timer). The program I am trying to make has a class called Date. ...
[5 replies] Last: class Date{ public: Date(int d, int m, int y) // this is a function... (by Nico)
by Givi
Urgent help && || with do-while loop and bank account
 
User can't withdraw more than what's available or withdraw a negative amount.(i have a deposit function for this already). The && or || is confusing me more tha...
[4 replies] Last: this code was a snippet of my program I understand that. What i was... (by AbstractionAnon)
Challenging code! Help much appreciated:)
 
Hello I am working on a program that asks the users for : A)what year they want the calender, (eg. 2012) B) then asks on what # day of the week (eg. #1-7...
[8 replies] Last: In essence, you want to shift from foo 1 2 3 4 bar 1 2 3 4 gaz 1 2 ... (by keskiverto)
Columns
 
So I'm writing a code that outputs ASCII code and I want it to be in columns. Right now my output is like this, 32 33 ! 34 " 35 # 36 $ 37 % etc 43 ...
[4 replies] Last: #include <iostream> inline char ascii(unsigned short int ascii_code... (by boost lexical cast)
Where did i go wrong with merge sort
 
doesn't sort right #include <iostream> #include <vector> using namespace std; void Merg(vector<int> & A , int S ,int M, int E) { int size = ...
[1 reply] : At least the line 16 looks suspicious. (by keskiverto)
Segmentation fault
 
We have two maps: map<string,string> x; map<string,pair<string,string> > y; The program ends when we write "****", but the terminal is showing us a Segme...
[3 replies] Last: You need to show us the code that uses that class. There's nothing in... (by MikeyBoy)
forward declaration confusion
 
I am unsure where to place forward declarations. Is it possible not to place them in the header file? Reason I ask is because the following compile error o...
[5 replies] Last: thanks for replying. 1. understand your point, to do with the fact th... (by bluefrog)
A very beginners question
 
Hello, I am trying to read two variables, a string and an integer, respectively. Those two variables are read in a loop, until following string is typed. "No...
[6 replies] Last: The reason I did ask about >> and getline was that first extracts one ... (by keskiverto)
Vector to Struct
 
I have this section for a program I'm working on where I am inputting into a vector within a structure. The syntax all seems correct, but I get this weird error...
[6 replies] Last: priority_queue< ClTableau, deque<ClTableau>, less<ClTableau> > priorit... (by yushi170)
by kmce
While loop, while !=float
 
So I was wanting to have a while loop, which loops until the user inputs a float, so basically if the user inputs words the loop will occur, however I am having...
[13 replies] Last: http://www.cplusplus.com/reference/istream/istream/operator%3E%3E/ htt... (by keskiverto)
Help with opening a file as an argument
 
I am having an issue in the function fillSquare. My problem is that I can't figure out how to take the argument and put the data from the file into the array. I...
[1 reply] : You need to give the function parameter a name so that you have a way ... (by Peter87)
how do i locate the largest number in the array?
 
the array size is randomly generated lets say the size is 34 i found the largest number in the away in cell 16 how do i cout cell 16
[8 replies] Last: I don't mean any offense here. But, with the above code you might as ... (by boost lexical cast)
Point Class - Geometry Based Programs
 
Write your question here.Hello, I am stuck on this assignment question and am unsure as to how to get started. Could anyone help me get started? This is...
[19 replies] Last: c is the Circle object that you created on the line above. Circle ... (by Peter87)
Blob Help!
 
This is what I have so far, not really sure where to go with it. Apparently I'm not allowed to use recursion...Here is what my professor wants.. ). Write a C++...
[2 replies] Last: This is the updated code! #include <iostream> #include <stdio.h> #i... (by Unisaurus)
December 2016 Pages: 1... 25262728
  Archived months: [nov2016] [jan2017]

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