The way i've been looking at is something similar to this:
float af;
int a;
cin >> af;
a = (int) af;
Type: Posts; User: Asmodan
The way i've been looking at is something similar to this:
float af;
int a;
cin >> af;
a = (int) af;
If I have classes B, and C which are derived from class A, is it possible to store objects of B and C in an STL list declared as list<A> myList; or will these be stored as objects of class A only.
...
Is there a simple way of catching bad input for integers? Say if someone enters a character instead?
Thank you :) Will try this.
Could someone please tell me how to call base class functions from a derived class function with the same name?
Found my problem, it was in the header files.
For example, where I put
class CPersonalEntry: public CAddressBookEntry
{
public:
CPersonalEntry():CAddressBookEntry();
Thanks for your reply. Here are the contents of four of the files I'm using.
Entry.h
#ifndef __ENTRY_H
#define __ENTRY_H
#include <string.h>
I have two classes, Entry and PersonalEntry, which is derived from Entry.
The class Entry is in two files, Entry.h and Entry.cpp and PersonalEntry is in PersonalEntry.h and PersonalEntry.cpp
I...