![]() |
|
#1
|
|||
|
|||
Fairly simple classes help pleaseHi all, how's it going?
I'm a C++ novice and have this bad habit of writing code in one big 'main' file and then trying to split it up into classes and functions afterwards. The following program works fully but I need to have 'Town' as a class that stores the name, poulation and area (a town.h file). I know only the very basics about classes and so don't really know where to start. I'd appreciate any help thanks Sam [c] #include <iostream> #include <conio.h> #include <stdio.h> #include <string> //#include "town.h" using namespace std; int main() { int c,g; int n = 0; cout << "How many towns would you like to enter? "; cin >> c; string *narray = new string[c]; double *parray = new double[c]; double *aarray = new double CPP / C++ / C Code:
|
Recent GIDBlog
2nd Week of IA Training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| help with classes | bucho | MS Visual C++ / MFC Forum | 3 | 20-Oct-2004 06:16 |
| First time using classes | crystalattice | CPP / C++ Forum | 6 | 13-Oct-2004 08:21 |
| finding a simple cms | dopee | MySQL / PHP Forum | 1 | 23-Mar-2004 09:30 |
| ClassView not showing my classes (VC++, namespace, headers) ?!?!? | djovanov | CPP / C++ Forum | 1 | 13-Jan-2004 04:54 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The