If this post would be more appropiate in the C++ board I apologize in advance, although it is a game.
I am just learning C++ and am trying to make a game which is text based.
In the code i do not call for any data yet i was just trying to get the display format.
My Problem is this when i am ready to call whatever scene description and print the paragraph to the screen the rest of my formatting gets messed up
Code:
#include "stdafx.h"
#include "iostream.h"
int main(int argc, char* argv[])
{
cout.width(35);
cout << "Location" << endl << endl;
cout << " Gold: ";
cout.width(64);
cout <<"Weapon: " << endl;
cout <<"Armor: ";
cout.width(64);
cout <<"Spell: " << endl << endl;
cout.width(15);
for (int i=0;i<50;i++)
{
cout <<"*";
}
cout << endl;
cout.width(15);
cout << "*";
cout << " Description goes here";
cout.width(25);
cout << "*";
for (int j=0;j<15;j++)
{
cout << endl;
cout.width(15);
cout << "*";
cout.width(49);
cout << "*";
}
cout << endl;
cout.width(15);
for (int h=0;h<50;h++)
{
cout <<"*";
}
cout << endl;
cout << " Life:";
cout.width(55);
cout << "Mob Life:";
cout << endl;
cout << " Mana:";
cout << endl;
return 0;
}
maybe i need to make a function to do some formatting but each paragraph varies in size any help at all I would be grateful
thanx