I have made a grid and want to put text on each text block. can it be like some align command in graphics.. which allows us to align the text in each block... plz help me out with this....

Recommended Answers

All 3 Replies

Have you tried using formatted output? As far as I know, if you want alignment you have to specify it in your output. I could be wrong though.

I don't know about graphic commands but you can try using the left and right aligning commands.

Using std::cout you can use the features in <iomanip> for this. See here. Or, you can try with printf() .

An alternative is to separate everything by tabs/spaces/commas and carriage returns and then output to file and open it in your favourite spreadsheet application.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.