Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

defineing classes

klillklill Member Posts: 1
Can you have a returned message out of a class?
example
void Rectangle::setDimensions(float len, float wid)
{ // assigns length and width
if (len > 0 && wid > 0)
{ length = len;
width = wid;}
else if (len<0 || wid<0)
{cout<<"Invalid lengt or width";
}//end ifs
}//end setDimensions function


Comments

  • gustavosserragustavosserra Member Posts: 201
    : Can you have a returned message out of a class?

    ... As far as I know...yes!(but I'm not sure) Why don't you teste it?

  • Justin BibJustin Bib USAMember Posts: 0

    _ // http://forcoder.org // free video tutorials and ebooks about [ Assembly, PHP, JavaScript, Visual Basic, Perl, Scratch, C#, Objective-C, C, Java, Ruby, Python, Delphi, R, C++, MATLAB, Swift, PL/SQL, Go, Visual Basic .NET Fortran, Rust, Julia, Apex, FoxPro, Lua, Prolog, Logo, VBScript, Erlang, LabVIEW, Ada, ABAP, Transact-SQL, F#, Awk, ML, Crystal, SAS, COBOL, Scheme, Lisp, Dart, Scala, Alice, D, Bash, Kotlin, Hack, Clojure ] ____

Sign In or Register to comment.