Beginners - February 2016 (Page 4)

template member function's definition outside the class
 
If I have type alias in my class and 2 member functions template<typename T> Pool_alloc { //... using pointer = T*; using const_pointer = const T*...
[5 replies] Last: I think we have a winner!!! :D Tnx you so much for an answer JLBorges... (by etrusks)
character count in file
 
The question is to count characters of file....My code is giving one extra even when its not counting "end of line character"...please help me correct it... #...
[5 replies] Last: Ok let me try to explain in more detail. The original code: whil... (by Chervil)
by skkwan
about memory
 
Assume that an integer variable declared, X = 1;. and address of X is start from 2001 until 2004. So, my question is, can i only read the value that the address...
[6 replies] Last: Thanks JLBorges, definitely understand what it is ! Appreciate and tha... (by skkwan)
Example of a long C++ program?
 
Hi, I've been learning the C++ syntax for about 3 months now (on my own) and I don't really see how I can make any sort of "long" program that is at least 500 ...
[12 replies] Last: Of course, normally I would advocate against using namespace, but I ... (by admkrk)
Manticore -- Custom String Class (Feedback)
 
Hello, A couple of weeks ago I decided to test my knowledge I have gathered thus far and see if I could write my own string class. From what I have gathered fr...
[2 replies] Last: @kbw, Thank you very much for the feedback. I have re-worked the clas... (by Lonely One)
Insertion Sort Not Working For Classes?
 
So, I've created a class shape, which has the height, width and length of a 3D shape. Then, I create a function, that sorts it by height, but it doesn't work. W...
[2 replies] Last: I wanted just to sort it. I didn't know that you can customize the sor... (by jgg2002)
How do I use a switch/break statement with a loop for a char
 
I am trying to write a program that holds the amount of times a user buys either product a, b, or c, each have a set amount. I want to loop the program so that ...
[2 replies] Last: See my post here: http://www.cplusplus.com/forum/beginner/185611/ You ... (by joemikehunt)
Doubly Linked List Program
 
I had to make a program using a doubly linked list that holds the data of 6 people. The problem I am having is on line 84 there is an error that says bad access...
[5 replies] Last: Great! (by AlphaFoxAlpha)
Help with switch statements! And possibly other things...
 
Hello, I have been trying to create a program that will allow the user to input a product type and quantity sold however many times they would like, and use a s...
[1 reply] : This is like my 4th day of learning c++ so please let me know if there... (by joemikehunt)
Reading from a program without getline
 
I have to write a program to read from a tsv file and display the content of that file. I'm not sure where to start with this program. Please help, I'm lost.
[13 replies] Last: > how did the number of records change between the 2 programs though? ... (by JLBorges)
Need help with classes (NOT SCHOOL)
 
Okay I been out of the game for awhile, I forgot how to put the users input into the function when working with classes. Even the damn lingo for coding I'm rust...
[2 replies] Last: Thanks for the refresher. Problem solved. (by C0D3FR3AK)
Help ( war card game)
 
Hi i dont get why this doesn't work.... Could someone lend me a hand? The code works fine when changing numbers higher than 10 into Jack, Queen, King and Ace t...
[3 replies] Last: @MakoBelgium What would get printed if you and the computer had the s... (by whitenite1)
by Musica
Operator overloading assignment
 
My assignment is to be able to add, sub, mult and div 2 vectors etc However, I dont know how to do it with arrays. The main should look like this: Vecto...
[4 replies] Last: Oh man, got it. I did not know about the rule of three. Thank you very... (by Musica)
program using pointers
 
I was asked to do this assignment by my teacher. However i was absent for 3 days so i missed his lecture, would you help me just to get started with this progra...
[5 replies] Last: thank you so much! Just wondering if i am doing the hamming sort algor... (by robbie123)
Need help with a dice probability.
 
Here is what I have so far: #include <iostream> #include <ctime> #include <cstdlib> using namespace std; int main() { double toss; doub...
[1 reply] : I figured out my problem. I wasn't multiplying the probabilities by 10... (by BayBayMan)
Help with this code?
 
Hi i created this code and I want to finish it , it says there are no errors but Nothing is working no shapes are being drawn up when i compile Can someone hel...
[2 replies] Last: im soo stupid.. thankks i finished it haha (by ssingh25)
Why doesn't my program cout the first word of the new last name?
 
Write your question here. My program is supposed to print out any number of "new last names" separated by spaces. It prints out every single last name separate...
[2 replies] Last: My desired output would be Enter full name: John Doe Enter new last n... (by JoshuaStudent)
Help with Arrays - Need Help with inFiles & outFiles
 
im having trouble running the program, every time i opens it just closes can some please help me!! Question the Computer Science department needs help in ...
[8 replies] Last: just to delete second line solve this (by alexeyn)
How do I use arrays?
 
I am new to programming and am having trouble understanding how arrays are supposed to work. I have read the forum postings on arrays from multiple websites to ...
[1 reply] : it's wrong way you have two unknown things : length of each string a... (by alexeyn)
by Stolle
Template copy constructor
 
I have HashTable& operator=(const HashTable& aTable); template <typename HashElement> HashTable& HashTable<HashElement>::operator=(const HashTable& aTable) ...
[3 replies] Last: The template argument is not implicit for the return type when definin... (by Peter87)
February 2016 Pages: 123456... 46
  Archived months: [jan2016] [mar2016]

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