#Beginner started online course need help.

17 messages · Page 1 of 1 (latest)

chrome wyvernBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

solid ruin
#

here is the string.cpp

String.cpp

#include "String.h"

String::String()
{
}

String::String(const char* _str)
{
}

String::String(const String& _other)
{
}

String::~String()
{
}

size_t String::Length() const
{
    return size_t();
}

String& String::Append(const String& _str)
{
    // TODO: insert return statement here
}

String& String::ToLower()
{
    // TODO: insert return statement here
}

String& String::ToUpper()
{
    // TODO: insert return statement here
}

int String::FindCharacter(const char _chr)
{
    return 0;
}

int String::Replace(const char _find, const char _replace)
{
    return 0;
}

String& String::ReadFromConsole()
{
    // TODO: insert return statement here
}

String& String::WriteToConsole()
{
    // TODO: insert return statement here
}

bool String::operator==(const String& _other)
{
    return false;
}

char& String::operator[](size_t _index)
{
    // TODO: insert return statement here
}

const char& String::operator[](size_t _index) const
{
    // TODO: insert return statement here
}

String& String::operator=(const String& _str)
{
    // TODO: insert return statement here
}

bool String::operator<(const String& _str)
{
    return false;
}

I'm like super new to this and any help will be greatly appreciated thanks.

chrome wyvernBOT
#

@solid ruin Has your question been resolved? If so, type !solved :)

covert stone
#

I would start with implementing the constructors

#

If you have specific questions on the parts you're confused, it's easier for people to help you

echo spoke
#

I mean this definitely seems like something the course work should have prepared you for. We can help with specific issues and questions of course.

solid ruin
solid ruin
covert stone
#

If you look carefully at the code they gave you, you will see clues on what data members the String class should have

#

Specifically look at the constructors and the getters and setters (think you only have getters in here though)

#

And, yea, you’re heading in the right direction but still have a lot of work to do

covert stone
#

np

solid ruin
#

for the string.cpp for the return staments section im just calling whats been writting String.h?

covert stone
#

Wdym by that?

#

string.cpp is where you implement the public constructors and member functions in this case

solid ruin
#

ok thank you