Thread: main interface

  1. #1
    Registered User
    Join Date
    Aug 2001

    main interface

    umm hi Im making a text RPG with C++ and i have a number of problems (im doing this for learning purposes btw);

    ive made this main screen which displays a box for the game text to appear in but i cant do it with out disrupting the whole box. the text has to be updated frequently
    i was thinkin iomanip but i think i will have the same problem
    in the places where it says spells or wepon they will call to the struct for that wepon or spell each time the main interface is updated
    well take a look i apreciate all suggestions thanx:

    #include <iostream.h>
    const char NL = '\n';
    int main(int argc, char* argv[])
    	cout << NL; 
    	cout << "Player name goes here\t\t\t\t\t\tcurrent wepon" << NL;
    	cout << "                     \t\t\t\t\t\tcurrent spell";
    	cout << NL << NL << NL << NL << NL;
    	cout << "\t\t";
    	for (int i = 0;i<50;i++)
    		cout << "*";
    	cout << endl << "\t\t";
    	for (int j = 0;j<10;j++)
    		cout << "*" << "                                                " << "*" << endl << "\t\t";
    	for (int q = 0;q<50;q++)
    		cout << "*";
    	cout << NL << NL << NL << NL;
    	cout << "\tYour current life is:" << "****************************************" << NL;	//will call to apropriate struct for correct # of stars
    	cout << "\tYour current mana is:" << "****************************************" << NL;
    	return 0;

  2. #2
    you need better formatting. try setw( ) which isnt bad, or failing that start looking into printf type functions

  3. #3
    Registered User
    Join Date
    Mar 2002
    const char NL = '\n';
    what would be the purpose of doing this?
    why not just use endl or \n

  4. #4
    Registered User
    Join Date
    Aug 2001
    I dont know haha

    ask Rob McGregor

  5. #5
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Hehe, I have that book. The explanations are nice and simplistic, but the code is lacking somewhat.

    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Calling IRichEditOle interface methods
    By Niara in forum C Programming
    Replies: 2
    Last Post: 01-16-2009, 01:23 PM
  2. Return Statement
    By Daveo in forum C Programming
    Replies: 21
    Last Post: 11-09-2004, 05:14 AM
  3. Int Main or Void Main?
    By FromHolland in forum C++ Programming
    Replies: 9
    Last Post: 06-12-2003, 04:29 PM
  4. int main (), main (), main (void), int main (void) HELP!!!
    By SmokingMonkey in forum C++ Programming
    Replies: 7
    Last Post: 05-31-2003, 09:46 PM
  5. what to do with the main window
    By stallion in forum Windows Programming
    Replies: 2
    Last Post: 01-28-2003, 08:58 PM