Click here to Skip to main content
15,922,894 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralBuild times Pin
Jim Crafton8-Feb-05 16:59
Jim Crafton8-Feb-05 16:59 
GeneralRe: Build times Pin
David Crow9-Feb-05 2:52
David Crow9-Feb-05 2:52 
GeneralRe: Build times Pin
Jim Crafton9-Feb-05 13:31
Jim Crafton9-Feb-05 13:31 
GeneralRe: Build times Pin
Rick Crone9-Feb-05 10:27
Rick Crone9-Feb-05 10:27 
GeneralHelp with a very simple program!!!!!! Pin
DHAPPREP8-Feb-05 14:26
DHAPPREP8-Feb-05 14:26 
GeneralRe: Help with a very simple program!!!!!! Pin
JKallen8-Feb-05 15:31
JKallen8-Feb-05 15:31 
GeneralRe: Help with a very simple program!!!!!! Pin
Atptour8-Feb-05 20:25
Atptour8-Feb-05 20:25 
GeneralHelp with this program Pin
123dave1238-Feb-05 14:19
123dave1238-Feb-05 14:19 
hey guys, i'm pretty new to C++ and have a program i'm trying to write. i basically have the .h file done except for the private data members. the project instructions are below as well as what i have of the .h file. i'm sure you guys probably think this is easy but if anyone can do it so atleast i have something to refer to i'd aprecitae it. thanks

Your job is to implement and test this ADT using an array allocated with the new operator in the constructors and de-allocated with the delete [] operator in the destructor. You will find that three data members will be sufficient for the job. At a minimum, you must test each function with enough different arguments to show it works.

You are allowed to define additional helper functions, member functions or otherwise

//---------------------------------------------------------------------------
#ifndef MyStringH
#define MyStringH
//---------------------------------------------------------------------------
typedef char CharType; // Allow for other character types

class String
{
public:
// Constructors and Destructor
String( int capacity = 50 ); // Make empty String with given capacity
String( const String & str ); // Copy str
String( const CharType * str, int capacity = 50 ); // Make str a String
~String();

// Queries
unsigned Length() const { return count_; }
bool IsEmpty() const { return (count_ == 0); }
bool IsFull() const { return count_ == capacity_; }
int IndexOf( const String & str );
String SubString( unsigned start, unsigned count ) const; // Copy out
const CharType * c_str() const;

// Modifiers
CharType & operator[]( int index ) { return string_[index]; } // Unsafe

bool Delete( unsigned start, unsigned count );

bool Insert( unsigned pos, const String & str );

private:

I NEED THE PRIVATE DATA MEMBERS FOR HERE

};
//---------------------------------------------------------------------------
#endif

thanks again Smile | :)

GeneralRe: Help with this program Pin
Member 13063378-Feb-05 17:22
Member 13063378-Feb-05 17:22 
GeneralRe: Help with this program Pin
toxcct8-Feb-05 21:32
toxcct8-Feb-05 21:32 
GeneralRe: Help with this program Pin
pc_dev8-Feb-05 21:48
pc_dev8-Feb-05 21:48 
Generalspawnl Pin
Zizilamoroso8-Feb-05 13:51
Zizilamoroso8-Feb-05 13:51 
GeneralRe: spawnl Pin
Ryan Binns8-Feb-05 17:03
Ryan Binns8-Feb-05 17:03 
GeneralRe: spawnl Pin
2249178-Feb-05 19:12
2249178-Feb-05 19:12 
GeneralShould Be Simple Disabling "Return" Pin
JKallen8-Feb-05 13:47
JKallen8-Feb-05 13:47 
GeneralRe: Should Be Simple Disabling "Return" Pin
Michael Dunn8-Feb-05 14:02
sitebuilderMichael Dunn8-Feb-05 14:02 
GeneralRe: Should Be Simple Disabling "Return" Pin
JKallen8-Feb-05 14:21
JKallen8-Feb-05 14:21 
GeneralRe: Should Be Simple Disabling "Return" Pin
Nish Nishant8-Feb-05 19:14
sitebuilderNish Nishant8-Feb-05 19:14 
GeneralReading Excel files w/ CDatabase Pin
shultas8-Feb-05 13:00
shultas8-Feb-05 13:00 
GeneralRe: Reading Excel files w/ CDatabase Pin
David Crow9-Feb-05 3:36
David Crow9-Feb-05 3:36 
Questionhow to activate a window from a pull-down list Pin
elephantstar8-Feb-05 12:59
elephantstar8-Feb-05 12:59 
QuestionHow do I set a field that accepts an OLE document (Excel, Word, etc.) in an access table? Pin
nonothing8-Feb-05 11:56
nonothing8-Feb-05 11:56 
GeneralCompile/Link Work, Code Doesn't Pin
KenWill8-Feb-05 11:45
KenWill8-Feb-05 11:45 
GeneralRe: Compile/Link Work, Code Doesn't Pin
marinme8-Feb-05 16:31
marinme8-Feb-05 16:31 
GeneralRe: Compile/Link Work, Code Doesn't Pin
KenWill9-Feb-05 3:36
KenWill9-Feb-05 3:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.