Transcription of Summary of basic C++-commands
{{id}} {{{paragraph}}}
Summary of basic C++-commandsCompilingTo compile a C++-program, you can use eitherg++orc++.g++ ++ ++ -o C++ C++ the following commands you can find at the end of this Summary command in C++ is followed by ; . Carriage return has no meaningin C++.CommentsEssential for the writing of clear programs are comments, which are explana-tions for your program, and which are ignored by the *..*/puts the text..into comment (more than one line possible)//..puts text..for rest of same line into commentData TypesData TypeDeclaration (Example)Assignment (Example)integershort i1,i2;i1 = 3;int i1,i2;long i1,i2;unsigned i1,i2;unsigned long i1,i2;realfloat f1,f2;f1 = ; f2 = ;double f1,f2;long double f1,f2;single characterchar c1,c2;c1 = R string of charactersstring s1,s2;s1 = Farmer logicalbool b1,b2;b1 = true; b2 = falseInput And OutputInput/Output With Screen:To be able to use the following commands you need to write#include <iostream>using namespace std;at the beginning of your program:output:cout << string of characters ;cout << variable; << endl;input:cin >
Summary of basic C++-commands Compiling To compile a C++-program, you can use either g++or c++. g++ -oexecutable filename.out sourcefilename.cc c++ -oexecutable filename.out sourcefilename.cc ... To be able to use all of the following functions you need to to write at the
Domain:
Source:
Link to this page:
Please notify us if you found a problem with this document:
{{id}} {{{paragraph}}}
All about the Use & Care, All about the Use& Care, Unit 1 Characteristics and classification of living, Unit 1 Characteristics and classification, Use Case Diagrams, Complete List of English Verb Tenses, Language structure and use, Grammar: Capital Letters - Upper Case or, Use all, Grammar Handbook, Capella University