Click here to Skip to main content
15,851,510 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to find the index of smallest 3 elements in an array Pin
User 1350945030-Nov-17 5:56
professionalUser 1350945030-Nov-17 5:56 
QuestionPrecision in C Pin
Anonygeeker29-Nov-17 19:13
Anonygeeker29-Nov-17 19:13 
AnswerRe: Precision in C Pin
Peter_in_278029-Nov-17 20:05
professionalPeter_in_278029-Nov-17 20:05 
AnswerRe: Precision in C Pin
Rick York29-Nov-17 20:51
mveRick York29-Nov-17 20:51 
AnswerRe: Precision in C Pin
Richard MacCutchan29-Nov-17 22:40
mveRichard MacCutchan29-Nov-17 22:40 
SuggestionRe: Precision in C Pin
David Crow30-Nov-17 6:20
David Crow30-Nov-17 6:20 
Questionwhat is contained in iostream and std Pin
Anonygeeker29-Nov-17 0:21
Anonygeeker29-Nov-17 0:21 
AnswerRe: what is contained in iostream and std Pin
CPallini29-Nov-17 1:33
mveCPallini29-Nov-17 1:33 
In order to have insight on <iostream> content, feel free to check out the documentation: <iostream> - C++ Reference[^].

std is the namespace[^] of the C++ Standard Library, quoting Wikipedia[^]: "Features of the C++ Standard Library are declared within the std namespace".

In order to use <iostream> objects, e.g. cout you need either to
  • Qualify it with the std namespace specifier,
    e.g.
    C++
    #include <iostream>
    int main()
    {
      std::cout << "hi" << std::endl;
    }
or
  • Take advantge of the using namespace std; statement,
    e.g.
    C++
    #include <iostream>
    using namespace std;
    int main()
    {
      cout << "hi" << endl;
    }


modified 29-Nov-17 6:44am.

GeneralRe: what is contained in iostream and std Pin
Anonygeeker29-Nov-17 2:16
Anonygeeker29-Nov-17 2:16 
GeneralRe: what is contained in iostream and std Pin
CPallini29-Nov-17 2:23
mveCPallini29-Nov-17 2:23 
AnswerRe: what is contained in iostream and std Pin
jschell29-Nov-17 13:39
jschell29-Nov-17 13:39 
QuestionC++ cout in header file error - ‘cout’ was not declared in this scope Pin
Vaclav_27-Nov-17 15:23
Vaclav_27-Nov-17 15:23 
QuestionRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
David Crow27-Nov-17 17:47
David Crow27-Nov-17 17:47 
AnswerRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
CPallini27-Nov-17 22:31
mveCPallini27-Nov-17 22:31 
AnswerRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
Jochen Arndt27-Nov-17 22:26
professionalJochen Arndt27-Nov-17 22:26 
AnswerRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
Richard MacCutchan27-Nov-17 22:53
mveRichard MacCutchan27-Nov-17 22:53 
GeneralRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
Vaclav_28-Nov-17 5:09
Vaclav_28-Nov-17 5:09 
GeneralRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
Richard MacCutchan28-Nov-17 5:25
mveRichard MacCutchan28-Nov-17 5:25 
GeneralRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
Vaclav_28-Nov-17 8:07
Vaclav_28-Nov-17 8:07 
GeneralRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
Richard MacCutchan28-Nov-17 9:37
mveRichard MacCutchan28-Nov-17 9:37 
AnswerRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
Jochen Arndt28-Nov-17 5:54
professionalJochen Arndt28-Nov-17 5:54 
GeneralRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
Vaclav_28-Nov-17 8:46
Vaclav_28-Nov-17 8:46 
GeneralRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
Jochen Arndt28-Nov-17 9:39
professionalJochen Arndt28-Nov-17 9:39 
GeneralRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
David Crow28-Nov-17 9:14
David Crow28-Nov-17 9:14 
GeneralRe: C++ cout in header file error - ‘cout’ was not declared in this scope Pin
Vaclav_28-Nov-17 12:26
Vaclav_28-Nov-17 12:26 

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.