Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
cout
- Page 1
Segmentation Fault in C++ Program – Need Debugging
Programming
Software Development
1 Month Ago
by YashSmith
…;iostream> using namespace std; int main() { int arr[5];
cout
<< arr[10]; // Accessing out-of-bounds index return…
Re: Show computer name on a label
Programming
Software Development
1 Month Ago
by toneewa
… stdString = msclr::interop::marshal_as<std::string>(managedString); std::
cout
<< "Managed String: " << stdString <…
Re: Segmentation Fault in C++ Program – Need Debugging
Programming
Software Development
1 Month Ago
by Reverend Jim
Don't try to access past the end of the array.
Re: Segmentation Fault in C++ Program – Need Debugging
Programming
Software Development
1 Month Ago
by rproffitt
Thanks for the MVE (minimum viable example). But it's just bad code. c, c++ and a lot of language won't stop you from going out of bounds.
Re: Segmentation Fault in C++ Program – Need Debugging
Programming
Software Development
1 Month Ago
by Dani
You’re creating an array of 5 integers and then trying to access the 11th integer in the array (assuming the indexes start at 0). You’re getting an out of bounds error because you’re trying to access an array element that doesn’t exist. You can access arr[0] up through arr[4].
Re: Segmentation Fault in C++ Program – Need Debugging
Programming
Software Development
1 Month Ago
by Salem
It should be obvious by now from their posting history that the OP is a troll.
Re: cout problems
Programming
Software Development
18 Years Ago
by Infarction
… prepend it with std:: (as in std::
cout
) or put [inlinecode]using std::
cout
;[/inlinecode] in your file before you use it… in the .h file. Plus, you don't even use
cout
anywhere.
Re: cout.width
Programming
Software Development
12 Years Ago
by tinstaafl
`
cout
` is easily referenced by searching at that reference site. `
cout
` is from the `ostream` class, the `width` property is referenced there.
Re: cout problem
Programming
Software Development
13 Years Ago
by mike_2000_17
cout
is in the std namespace. You need to either qualify …, like so: [CODE] #include <iostream> int main() { std::
cout
<< "Hello World!" << std::endl…: [CODE] #include <iostream> using namespace std; int main() {
cout
<< "Hello World!" << endl; }; [/CODE…
Re: COUT
Programming
Software Development
12 Years Ago
by AmrMohammed
Thanks for the reply. When I wrote something like
cout
<< "Every age has a language … *iostream* contains the declarations that are needed by the
cout
identifier and the << operator?. What does it… are recognized in namespace *std* including
cout
is declared within it! is not *
cout
* declaration exists in the *iostream* header…
Re: COUT
Programming
Software Development
12 Years Ago
by asifalizaman
The word '
cout
'stands for console output.The '
cout
'is a standard output stream object .The standard output stream normally flows to the screen display.The '
cout
'stream object is used to print the output on the computer screen.The '
cout
'is part of 'isotream.h'header file
Re: COUT
Programming
Software Development
12 Years Ago
by deceptikon
> The word '
cout
'stands for console output. It stands for "character", as stated by a [somewhat authoritative souce](http://www.stroustrup.com/bs_faq2.html#
cout
). That's fortunate too, because if `
cout
` were named after and designed for consoles and screen display only, it would be vastly inferior to the general stream we enjoy today.
COUT
Programming
Software Development
12 Years Ago
by AmrMohammed
Greetings While reading I encountered a statement I did not understand what does it mean "
Cout
is a predefiend object in C++ **to correspond to the *standard output stream*** 1- What is that exactly mean? 2- what is the *standard output stream* & *standard input stream*?
COUT Convert to PRINTF
Programming
Software Development
13 Years Ago
by Shodow
… similarInBoy=0; int similarInGirl=0; int total; clrscr();
cout
<<"Enter Boy's Name: "; cin…girl); similarInGirl=findSimilar(girl,boy); total=similarInGirl+similarInBoy;
cout
<<"Boy: "<<similarInBoy<…lt;total<<","; checkValue(total,3);
cout
<<"\n"; getch(); return 0; }…
Cout a String
Programming
Software Development
14 Years Ago
by yongj
…cin, testa); bib.setTestament(testa); bib.getTestament();
cout
<< "Please enter the contents…vers; testament = testa; } void Bible::setInput() {
cout
<< "Enter the book name, chapter…string Bible::getText() { return text; } void Bible::write1() {
cout
<< name << " " <&…
cout problem with customer order
Programming
Software Development
14 Years Ago
by kominosmash
…); subtotal = takeOrder(orderNumber); total = totalSale(subtotal);
cout
<<"Your total is:"<<total… 0; } void welcome(int& orderNumber) {
cout
<<"Welcome to Large Joe's, can …else if (orderNumber == 2) { subtotal = subtotal + 6.99; }
cout
<<"Would you like fries with your order…
Re: COUT Convert to PRINTF
Programming
Software Development
13 Years Ago
by Shodow
my bad help me convert
cout
to printf and cin to scanf.. help me pls asap
Re: COUT Convert to PRINTF
Programming
Software Development
13 Years Ago
by D33wakar
[QUOTE=Shodow;1658184]my bad help me convert
cout
to printf and cin to scanf.. help me pls asap[/…
cout did not appear and Nesting IF ELSE
Programming
Software Development
16 Years Ago
by ahfrey85
…>>selclass; switch(selclass) { switch(selclass) { case 1:
cout
<<"Seats available \n"; for(i=1…position; //User's selected seat if (position > 20) {
cout
<<"Seat Number: "<<position<… Class\n"; } else{ if (seats[position]=0)
cout
<<"You have booked "<<position…
Re: cout.width
Programming
Software Development
12 Years Ago
by deceptikon
…
cout
.width(10);
cout
<< "bar";
cout
<< "'\n";
cout
<< "'";
cout
.width(10);
cout
.…setf(ios::left);
cout
<< …
Re: cout or printf
Programming
Software Development
18 Years Ago
by Infarction
…;< setw(10) << filename << "]";
cout
<< " user: [" << setw(10) … << right << "]";
cout
<< "\n";
cout
<< "Trial " <<… << fixed << setprecision(2) << fValue;
cout
<< endl; return 0; }[/code] Output: [code]$ g++ …
Re: cout did not appear and Nesting IF ELSE
Programming
Software Development
16 Years Ago
by Lerner
[code]else { if (seats[position]==0)
cout
<<"You have booked "<<position&…
Re: cout did not appear and Nesting IF ELSE
Programming
Software Development
16 Years Ago
by ahfrey85
… about adding 1 more after [code] if (seats[position]==0)
cout
<<"You have booked "<<position…;; //stucked seats[position]=1; [/code] in order for me to
cout
a sentence to prompt that the seat is taken im…
Re: cout padding and text alignment
Programming
Software Development
15 Years Ago
by Tom Gunn
…only right justify the first string: [code=cplusplus]
cout
.width(30);
cout
<< "right justified\n" …need to split the output into two statements because
cout
.width() does not return a reference to the…chained: [code=cplusplus]
cout
.width(30);
cout
<< "right justified\n";
cout
.width(30);
cout
<< "…
Re: cout not declared in this scope
Programming
Software Development
14 Years Ago
by KAY111
…/media/HCL_DISK3/bim-1.0/common/base_parser.cc:99: error: ‘
cout
’ was not declared in this scope /media/HCL_DISK3/bim-1….0/common/base_parser.cc:105: error: ‘
cout
’ was not declared in this scope /media/HCL_DISK3/bim-1….0/common/base_parser.cc:106: error: ‘
cout
’ was not declared in this scope /media/HCL_DISK3/bim-1…
cout.width
Programming
Software Development
13 Years Ago
by tikoti
…> using namespace std; int main(void) {
cout
.width(8);
cout
.setf(std::ios::fixed | std::ios::right); for …) { for (int column = 0; column < 5; ++column) {
cout
<< row << ":" << column…return 0; } [/CODE] I realize that by moving the
cout
.width inside the loop but do the trick in this…
cout or printf
Programming
Software Development
18 Years Ago
by guy40az
…really sure how to format the output of the
cout
function. Like in the printf statements below its …decimal point. Can you format the output that way using
cout
? printf("Mag = %12.6f\n",AM[…GL = %12.6f\n",GL[PN]*180/PI);
cout
<< "\n\n\n\nPress a key…
Re: cout.width
Programming
Software Development
13 Years Ago
by L7Sqr
…void operator()(int r, int c) { std::
cout
.width(8); std::
cout
.setf(std::ios::fixed | std::ios::right); …std::
cout
<< r << ':' << c;…column < 5; ++column) { format(row,column); } std::
cout
<< std::endl; } return 0; }[/code]
Re: cout is too slow
Programming
Software Development
18 Years Ago
by WolfPack
… seems to be the problem. You are calling [inlineCODE]
cout
[/inlineCODE]too much. Remember that optimization of code should… [CODE] for ( i = 0 ; i < 50; i++ )
cout
<< '\n'; [/CODE] This piece of code calls [INLINECODE… 50 newline characters and output them all in a single
cout
call. like this [code] std::string newline( 50, …
cout types
Programming
Software Development
16 Years Ago
by daviddoria
… unsigned char a; printf("%u", a); but with
cout
,
cout
<< a; there is no type required. Do you… cast the variable in order to see a reasonable output
cout
<< (int)a; or something like that? How do… know which type to convert to? Ie when I do
cout
<< a; I get some crazy ascii character, but…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC