hmm.. thx:P but Im not 100 sure it will work.. hehe.. if I use a loop I cant make it exit afer 10 sec. but I can make it exit if time has passed 10 sec when the user hits a key, or I can get him to...
Type: Posts; User: boozy
hmm.. thx:P but Im not 100 sure it will work.. hehe.. if I use a loop I cant make it exit afer 10 sec. but I can make it exit if time has passed 10 sec when the user hits a key, or I can get him to...
thats true.. never tested that program and just wrote something so ppl could get some understanding af what Im trying to ask. so is not possible in c\c++ programming. was just thinking about...
hi :)
Is it possible to make a question with a seartain time to answer it?
like:
char question1[20];
cout << "What are you?: ";
cin << question1;
try making that boadrs like
char[][]={'_', '_', '_', '_', '_', '_', '_',
'_', '_', '_', '_', '_', '_'}
and print it out like that on screen.
and you can make a switch case...
sorry about the text, some of it is in norwegian.
I have a problem with my saveing to a file.. I can save it but it gets saved as numbers, and strange signs..
here is the program, a little long tho.
#include <conio>
#include <iostream>...
Thanks.. thats what I needed;) and so much more simple to handle then my program which the compiler dont like.
yeah.. thx for the pointers but what I need is not a single word compare that would make it easy. but I need some system so that when you type "get shirt" it checked first word "get" and then what to...
I have 2 problems, the code posted here is a commandline to a mud, it works, but not as good as it should. is there any way to make it better? some better way to split up the words into diferent...
ok.. I made this work ok.. but now I have the problem, I cant enter one word without 2 spaces.. like "exit" or "quit" "stat" etc.. my code is now:
#include <iostream.h>
#include <conio.h>...
If you go into the folder for boland c++, you can find a graffics demo there.. you can try to study it some and see if you figure it out. they change size, front, colors etc etc. as for the colour...
Thank you:P Ill try some of it out:P here is the mudgame tast Im working on, if you like to take a look. what I was trying to get from this thread was making all the getches into cin`s.
if you look...
You have any example of that? a code or something I can look at? or some link to som place where I can more clearly understand what you mean:P thanks
what I cant make work is having a commandline which can take 2 commands seperated by a space.. like "get potion" or "wear shirt".. its probebly as easy as anything but cant make my code work.. if...
Well, if I call randomize outside the loop, you will dodge, hit or get hit all the time. the fight would have no effect:P if this is what you ment. ok.. what I ment was can I like have a comandline...
but if you have 2 functions called the same:P but never mind me
do{
randomize();
result = rand() % 15;
sleep(1);
if (result == 1||result == 6||result == 7)
{
sleep(1);
textattr(4 << 0); cprintf("The enemy strikes you with his pow\r\n\n");
I got the same error:P but not with (void). I had (int) and needed (int&).. but since its void.. maby you are using some function 2 times in tha same porgram.. but then again Im still a newbie:P
hmm.. why not use a loop? should be easyer and better to use I would think.
[code]
#include <iostream.h>
#include <ctime>
#include <cstdio>
using namespace std;
int main()
can you make 2 things work at he same time? like makeing something like this:
main()
{
int min = 0, sec = 0, houre = 0, day = 0;
while (1){
delay(1000);
No but its the only way I have gotten the fight, and the rooms to work in the same program unless I had all the code in the same .cpp file.. yes I know I dont need to use that many goto in one file:P...
just place a getch(); or system("pause"); at the end of your program and it wont close until you hit some bottom, or you can make a loop that restarts your program at the end. include conio.h for...
well.. I am a newbie at this:P and my problem with the header file is that I use goto in my program. to go to diffrent "rooms" and fierent enemy's. and I cant type goto inside the headerfile to goto...
Im making this bad mudgame, just to learn c++ while doing sometjhing, and I came to a problem. I have made enemies in a nother file. and I tryed using header files, bu that diddnt work like planed so...
I have a defining problem if anyone care to help me:P
Im trying to define diferent keys on the keyboard to do
things in a program. but I cant make it work.
#define K 4b
if (K=='1')
{i++}
...