need help analyzing the code in the comments of “Output letters one at a time in C++?” [on hold]











up vote
-7
down vote

favorite












heres the link to the post that i am talking about: Output letters one at a time in C++?



the post only has one comment and im having a tough time understanding the code itself, i am fairly new to c++ so please try not to be too technical about your wording, thanks!










share|improve this question







New contributor




henry gregg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as unclear what you're asking by Fred Larson, NathanOliver, Matthieu Brucher, gnat, DanielBarbarian yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1




    1) There is no code in the comments. All I see is a question, that has one answer. 2) What, exactly, is unclear to you?
    – Algirdas Preidžius
    2 days ago










  • @AlgirdasPreidžius sorry i made a stack overflow account like 20 min ago just to ask this, so im kinda confused on the whole website. it is actually the answer that you talked about is what im asking for analysis. also i kinda just need someone to tell me how the code is connected and working together, like what does void type_text do for the program. sorry for the confusion i have caused!
    – henry gregg
    2 days ago








  • 1




    You can ask clarifications in the comment of the answer if you have trouble understanding it.
    – Matthieu Brucher
    2 days ago










  • @henrygregg If you are confused about the website, you should've taken the tour, read through help center, and How to Ask, before asking the question, so you wouldn't be as confused.
    – Algirdas Preidžius
    2 days ago












  • @MatthieuBrucher Technically, he couldn't, due to not having 50 reputation :)
    – Algirdas Preidžius
    2 days ago















up vote
-7
down vote

favorite












heres the link to the post that i am talking about: Output letters one at a time in C++?



the post only has one comment and im having a tough time understanding the code itself, i am fairly new to c++ so please try not to be too technical about your wording, thanks!










share|improve this question







New contributor




henry gregg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as unclear what you're asking by Fred Larson, NathanOliver, Matthieu Brucher, gnat, DanielBarbarian yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.











  • 1




    1) There is no code in the comments. All I see is a question, that has one answer. 2) What, exactly, is unclear to you?
    – Algirdas Preidžius
    2 days ago










  • @AlgirdasPreidžius sorry i made a stack overflow account like 20 min ago just to ask this, so im kinda confused on the whole website. it is actually the answer that you talked about is what im asking for analysis. also i kinda just need someone to tell me how the code is connected and working together, like what does void type_text do for the program. sorry for the confusion i have caused!
    – henry gregg
    2 days ago








  • 1




    You can ask clarifications in the comment of the answer if you have trouble understanding it.
    – Matthieu Brucher
    2 days ago










  • @henrygregg If you are confused about the website, you should've taken the tour, read through help center, and How to Ask, before asking the question, so you wouldn't be as confused.
    – Algirdas Preidžius
    2 days ago












  • @MatthieuBrucher Technically, he couldn't, due to not having 50 reputation :)
    – Algirdas Preidžius
    2 days ago













up vote
-7
down vote

favorite









up vote
-7
down vote

favorite











heres the link to the post that i am talking about: Output letters one at a time in C++?



the post only has one comment and im having a tough time understanding the code itself, i am fairly new to c++ so please try not to be too technical about your wording, thanks!










share|improve this question







New contributor




henry gregg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











heres the link to the post that i am talking about: Output letters one at a time in C++?



the post only has one comment and im having a tough time understanding the code itself, i am fairly new to c++ so please try not to be too technical about your wording, thanks!







c++ for-loop sleep code-analysis void






share|improve this question







New contributor




henry gregg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




henry gregg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




henry gregg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









henry gregg

1




1




New contributor




henry gregg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





henry gregg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






henry gregg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as unclear what you're asking by Fred Larson, NathanOliver, Matthieu Brucher, gnat, DanielBarbarian yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






put on hold as unclear what you're asking by Fred Larson, NathanOliver, Matthieu Brucher, gnat, DanielBarbarian yesterday


Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.










  • 1




    1) There is no code in the comments. All I see is a question, that has one answer. 2) What, exactly, is unclear to you?
    – Algirdas Preidžius
    2 days ago










  • @AlgirdasPreidžius sorry i made a stack overflow account like 20 min ago just to ask this, so im kinda confused on the whole website. it is actually the answer that you talked about is what im asking for analysis. also i kinda just need someone to tell me how the code is connected and working together, like what does void type_text do for the program. sorry for the confusion i have caused!
    – henry gregg
    2 days ago








  • 1




    You can ask clarifications in the comment of the answer if you have trouble understanding it.
    – Matthieu Brucher
    2 days ago










  • @henrygregg If you are confused about the website, you should've taken the tour, read through help center, and How to Ask, before asking the question, so you wouldn't be as confused.
    – Algirdas Preidžius
    2 days ago












  • @MatthieuBrucher Technically, he couldn't, due to not having 50 reputation :)
    – Algirdas Preidžius
    2 days ago














  • 1




    1) There is no code in the comments. All I see is a question, that has one answer. 2) What, exactly, is unclear to you?
    – Algirdas Preidžius
    2 days ago










  • @AlgirdasPreidžius sorry i made a stack overflow account like 20 min ago just to ask this, so im kinda confused on the whole website. it is actually the answer that you talked about is what im asking for analysis. also i kinda just need someone to tell me how the code is connected and working together, like what does void type_text do for the program. sorry for the confusion i have caused!
    – henry gregg
    2 days ago








  • 1




    You can ask clarifications in the comment of the answer if you have trouble understanding it.
    – Matthieu Brucher
    2 days ago










  • @henrygregg If you are confused about the website, you should've taken the tour, read through help center, and How to Ask, before asking the question, so you wouldn't be as confused.
    – Algirdas Preidžius
    2 days ago












  • @MatthieuBrucher Technically, he couldn't, due to not having 50 reputation :)
    – Algirdas Preidžius
    2 days ago








1




1




1) There is no code in the comments. All I see is a question, that has one answer. 2) What, exactly, is unclear to you?
– Algirdas Preidžius
2 days ago




1) There is no code in the comments. All I see is a question, that has one answer. 2) What, exactly, is unclear to you?
– Algirdas Preidžius
2 days ago












@AlgirdasPreidžius sorry i made a stack overflow account like 20 min ago just to ask this, so im kinda confused on the whole website. it is actually the answer that you talked about is what im asking for analysis. also i kinda just need someone to tell me how the code is connected and working together, like what does void type_text do for the program. sorry for the confusion i have caused!
– henry gregg
2 days ago






@AlgirdasPreidžius sorry i made a stack overflow account like 20 min ago just to ask this, so im kinda confused on the whole website. it is actually the answer that you talked about is what im asking for analysis. also i kinda just need someone to tell me how the code is connected and working together, like what does void type_text do for the program. sorry for the confusion i have caused!
– henry gregg
2 days ago






1




1




You can ask clarifications in the comment of the answer if you have trouble understanding it.
– Matthieu Brucher
2 days ago




You can ask clarifications in the comment of the answer if you have trouble understanding it.
– Matthieu Brucher
2 days ago












@henrygregg If you are confused about the website, you should've taken the tour, read through help center, and How to Ask, before asking the question, so you wouldn't be as confused.
– Algirdas Preidžius
2 days ago






@henrygregg If you are confused about the website, you should've taken the tour, read through help center, and How to Ask, before asking the question, so you wouldn't be as confused.
– Algirdas Preidžius
2 days ago














@MatthieuBrucher Technically, he couldn't, due to not having 50 reputation :)
– Algirdas Preidžius
2 days ago




@MatthieuBrucher Technically, he couldn't, due to not having 50 reputation :)
– Algirdas Preidžius
2 days ago












1 Answer
1






active

oldest

votes

















up vote
0
down vote













It's pretty straightforward:




  1. When the program runs, main() is called


  2. main() calls the function type_text(const std::string &) once


  3. type_text() iterates over the characters in the std::string that was passed in as an argument ("Hello, World!"). For each character in this string, it prints that character to the program's cout stream (a.k.a stdout), then flushes cout to makes sure the character actually will appear immediately in the user's terminal window, and then sleeps for 60 milliseconds.

  4. Once the for-loop has iterated over all of the characters, type_text() returns, then main() returns, and at that point the program's execution is complete.






share|improve this answer





















  • Thank you very much!
    – henry gregg
    2 days ago


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













It's pretty straightforward:




  1. When the program runs, main() is called


  2. main() calls the function type_text(const std::string &) once


  3. type_text() iterates over the characters in the std::string that was passed in as an argument ("Hello, World!"). For each character in this string, it prints that character to the program's cout stream (a.k.a stdout), then flushes cout to makes sure the character actually will appear immediately in the user's terminal window, and then sleeps for 60 milliseconds.

  4. Once the for-loop has iterated over all of the characters, type_text() returns, then main() returns, and at that point the program's execution is complete.






share|improve this answer





















  • Thank you very much!
    – henry gregg
    2 days ago















up vote
0
down vote













It's pretty straightforward:




  1. When the program runs, main() is called


  2. main() calls the function type_text(const std::string &) once


  3. type_text() iterates over the characters in the std::string that was passed in as an argument ("Hello, World!"). For each character in this string, it prints that character to the program's cout stream (a.k.a stdout), then flushes cout to makes sure the character actually will appear immediately in the user's terminal window, and then sleeps for 60 milliseconds.

  4. Once the for-loop has iterated over all of the characters, type_text() returns, then main() returns, and at that point the program's execution is complete.






share|improve this answer





















  • Thank you very much!
    – henry gregg
    2 days ago













up vote
0
down vote










up vote
0
down vote









It's pretty straightforward:




  1. When the program runs, main() is called


  2. main() calls the function type_text(const std::string &) once


  3. type_text() iterates over the characters in the std::string that was passed in as an argument ("Hello, World!"). For each character in this string, it prints that character to the program's cout stream (a.k.a stdout), then flushes cout to makes sure the character actually will appear immediately in the user's terminal window, and then sleeps for 60 milliseconds.

  4. Once the for-loop has iterated over all of the characters, type_text() returns, then main() returns, and at that point the program's execution is complete.






share|improve this answer












It's pretty straightforward:




  1. When the program runs, main() is called


  2. main() calls the function type_text(const std::string &) once


  3. type_text() iterates over the characters in the std::string that was passed in as an argument ("Hello, World!"). For each character in this string, it prints that character to the program's cout stream (a.k.a stdout), then flushes cout to makes sure the character actually will appear immediately in the user's terminal window, and then sleeps for 60 milliseconds.

  4. Once the for-loop has iterated over all of the characters, type_text() returns, then main() returns, and at that point the program's execution is complete.







share|improve this answer












share|improve this answer



share|improve this answer










answered 2 days ago









Jeremy Friesner

37.8k1077157




37.8k1077157












  • Thank you very much!
    – henry gregg
    2 days ago


















  • Thank you very much!
    – henry gregg
    2 days ago
















Thank you very much!
– henry gregg
2 days ago




Thank you very much!
– henry gregg
2 days ago



Popular posts from this blog

Sphinx de Gizeh

Dijon

Équipe cycliste