| | |
List with static array.
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2008
Posts: 28
Reputation:
Solved Threads: 0
I wrote a header file, now i need to write a list.cpp and main.cpp file
The header file is like this.
The header file is like this.
•
•
•
•
#include<iostream>
#include<string>
class List
{
public:
/**** Function members*****/
List(); // constructor
bool empty() const
void insert(char days, int pos);
void erase(int pos);
void display(ostream & out) const
private:
/****** Data Members *******/
int mySize;
Char days[5];
}; //---- end of List class
ostream & operator<< (ostream & out, const List & aList);
•
•
Join Date: Jul 2008
Posts: 28
Reputation:
Solved Threads: 0
The output screen should be like this.
C++ Syntax (Toggle Plain Text)
Enter one of the following: 1 to insert an arranged day (Monday, Tuesday, Wednesday, Thursday, Friday) 2 to delete an arranged day 3 to display all arranged day(s) C:> 1 Enter the arranged day: Monday The arranged day list: Monday C:> 1 Enter the arranged day: Wednesday The arranged day list: Monday, Wednesday C:>3 Your arranged day list: Monday, Wednesday C:>2 Enter deleting day: Monday
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
![]() |
Similar Threads
- Semantic error: Cannot reach instance method: average( java.util.List ) from static c (Java)
- Dynamic Array to Static Array (C++)
- static array in a class (C++)
- Ordering an array (Java)
- deleting array elements (C)
- Is casting a static array to (char*) in strcpy() dangerous? (C)
- Problem in Reading Array Variable (C)
- Pascal database check (Pascal and Delphi)
Other Threads in the C++ Forum
- Previous Thread: i need help about this code please help!!
- Next Thread: finding mode
Views: 364 | Replies: 9
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib library linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output pointer problem program programming project python random read recursion recursive reference return sort stream string strings struct studio system template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






