473,387 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

use of setw()

Sir,
Can I know what will happen if negative integer argument is passed to Setw() function?
What do you mean by ragged array?
Jun 22 '07 #1
1 2959
sicarie
4,677 Expert Mod 4TB
Sir,
Can I know what will happen if negative integer argument is passed to Setw() function?
What do you mean by ragged array?
This will help with setw(), though I still believe the best way is to sit in front of a compiler and try it yourself, see what it outputs.

As for a ragged array, that's more of a definition question, that could probably be answered quickly and easily by Google. (I'm not exactly sure, though I would imagine it is one in which data is inserted sparsely in the indecies - ragged being different levels of "fullness" for each index, not all of them filled).
Jun 22 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Matthew David Hills | last post by:
If setw() is being used to limit how many characters are pulled from a stream, should the # of characters taken from the stream depend on whether the stream is being sent to a std::string or a...
0
by: Alex Vinokur | last post by:
Both function width() and manipulator setw() set field width for _next_ output operation. width() seems to be less handy because we should split a chain of <<. Is there any situation in which...
10
by: Mathieu Malaterre | last post by:
Hello, I am trying to get rid a of sprintf in a c++ code, but I tried in several ways and couldn't figure out how to change: uint16_t group, uint16_t element; sprintf(buffer, "%04x|%04x",...
2
by: tvn007 | last post by:
Below is my code: #include <string> #include <iostream> #include <iomanip> int main (void){ using namespace std; string name1 = "JOHN"; int id1 = 1234;
4
by: alternativa | last post by:
Hi, I'd like to obtain an output looking as follows: name number phone address Caroline 233 34234 White St. 12 Anna 929043 093284 Brown St. 325...
10
by: edd | last post by:
Hello all, I'm trying to put together some code that reads 3 adjacent pairs of hex digits from an istream. Each hex digit pair represents a non-negative integer. For example I would like to...
3
by: Jess | last post by:
Hello, I'm trying to use setw and width functions to set the padding spaces between numbers. The aim is to create two white spaces between two double e.g. "1.1 1.2". I did: streamsize s =...
2
by: fathi | last post by:
hello everyone, i am actually new to c++. my problem is i need to display information from a file but i don't know how to do so for more than 4 elements horizontally . my code: void...
5
by: Christian Johannes Charbula | last post by:
hi, does anybody know how i can get the information what width for a ostream is actually set? i want to do somthing like the following, and need a way to do something like stream.getw(). ...
16
by: Simonius | last post by:
Hello, I'm teaching myself C++ with Accelerated C++ by Andrew Koenig. I'm having a small problem with an exercise at page 73. Now I was wondering how I should do that with setw, easiest...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.