Beginners - February 2011 (Page 3)

Unresolved external referenced from
 
Hi guys. I have encountered a strange error which is probably neither synthax nor logical. It is related to improper usage of functions i suppose. Here is the ...
[1 reply] : Meh, looks like a spelling error. You seem to be missing an 's' from t... (by Computergeek01)
static variables
 
Is there a way to have a static member variable of a class and have it increment every time an object of that class is instantiated so that I know how many obje...
[9 replies] Last: I did not know that the value would be initialised to zero by default.... (by Moschops)
Seat Reservation Error
 
hi everyone, i was assigned to make a seating reservation and i was able to make a program, but i have few questions about it here's the code #include <ios...
[no replies]
Process pointers pointing to different structure types?
 
Hi! Say I have n similar structures a1,a2,a3,a4,a5,...,an, derived from a base structure a,. I need to create a function which automatically retrieves the val...
[2 replies] Last: Wow! That's exactely what I was looking for. I didn't know that an a* ... (by Ramses12)
by HMW
Problem reading from file to string
 
Hello all! I want to read from a simple text file to a string, I thought I had it covered - but for some reason I cannot get it to work. I searched the archi...
[4 replies] Last: Ok, I got it to work, for future reference - if anybody encounters sim... (by HMW)
linked list pointer understanding!
 
This is fairly elementary, but I am not getting it: class slist { slist() : h(nullptr){} ... void prepend(char); //adds to front of slist slistelem*...
[4 replies] Last: This had been bugging me for days. Thanks for the explanation. Makes p... (by philhippus)
array of char
 
ok this is something weird. a character variable can only store 1 character but an array of char having only 1 element can store huge values like "weeeerfffff...
[5 replies] Last: true (by crossfire1703)
compiler error seems to think I am trying to return a value on a ctor
 
I have been working on derived classes, and I have a class that is called MyTime that has a derived class TimeClock. When I try to compile the following it giv...
[1 reply] : never mind, I found my problem, in the .h file I didn't end the } wit... (by danaigo)
char variables
 
consider the following program segment: char a, b; cin>>a; cin>>b; cout<<a<<" "<<b; if we input: 2(enter) 3(enter) 2 gets stored in a and 3 get...
[4 replies] Last: when i said the same thing happens, i meant that 2 gets stored in a an... (by crossfire1703)
Quick question about pointers
 
Can a pointer point to variables in adifferent function or back to the main body of the code? If not, what a pointers actually used for?
[5 replies] Last: Hahah i try to understand the code and then try to use it in other pla... (by zone19871)
arrays....
 
i am doing an if statement that asks if an array spot is empty. not 0 but empty. i tried NULL but thats not doing it. thanks for the help
[11 replies] Last: In what situation do you want the array to be empty? Most of the time ... (by zone19871)
which operation can called iterator
 
I'm sorry I'm new to programming & cpp
[1 reply] : An iterator is not an operation. http://www.cplusplus.com/reference/... (by Bazzy)
Problem declaring bool
 
Hi guys Can someone please help me out here. I'm struggeling with 1 of my assignment questions. It si a multi choice question with 5 possible answers. The an...
[2 replies] Last: They do give me 4 possible answers. 1 if (dist <= 100) ... (by swanejs1)
Skipping text
 
Hi im fairly new to c++. I am writting a program that takes payment transactions(date,amount,credit card or cash) and splits into different files. Problem is t...
[1 reply] : cin.ignore(numeric_limits<streamsize>::max(), '\n');//#include <limit... (by hamsterman)
which operation can called iterator
 
I'm sorry I'm new to programming & cpp
[3 replies] Last: int i = 0; //what happen down here is iteration while (i < 100) {... (by chipp)
Question with simple card program
 
I am having some issues with this assignment. It says to write a program that simulates picking a card from a deck of 52 cards. For each card your program shoul...
[1 reply] : If is not that tedious there is only 52 cards and I will bet that if y... (by closed account iw0XoG1T)
quadratic equation
 
I trying to write this code for the quadratic equation. These are the instructions &#56259;dEnhance the Quadratic program in the following manner. If the ro...
[1 reply] : Do you have a question? (by closed account iw0XoG1T)
Trying To Learn 'extern'
 
I'm trying to learn how to use the extern keyword. I'm not understanding it very good if I'm honest. So far, this is what I've got: extern "C" { str...
[2 replies] Last: That makes sense. Thanks jsmith. (by closed account zb0S216C)
glDrawArray (how do you code it?)
 
In short, I have a 3Dmax file I exported and wanted to simply display it. I had to remove textures... all stuff that might make it complicated. extra note ...
[no replies]
A C++ book text I really really did not understand
 
========= this is a part of text from Stroustrup, pg 401 section 15.2.5.1. ========= What if different derived classes override the same function? This is ...
[6 replies] Last: m4ster r0shi : http://www.cplusplus.com/forum/beginner/37165/ co... (by navderm)
February 2011 Pages: 12345... 43
  Archived months: [jan2011] [mar2011]

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