Exit (0) works, thanks :)
Type: Posts; User: evilcubed
Exit (0) works, thanks :)
hmmm exit; doesnt seem to work? i also tried exit(); but it gave me an error of too few arguments
I would like to exit the program. I tried return; and it only exits the function.
I have a set of commands in a function that i want to end in return 0;
and i am using a void function. is there a work around to have a "return 0" type command in the function because i want it to...
How could I re write it for c?
i get this error:
error: expected ';', ',' or ')' before '=' token
for this line:
void hello(const char *message, const char *testMsg="Testing...\n")
I wanted to use "test" as an example of a name for a function. But the commands would be the same if i named the function like "hello" or something?
How can i make a function that does specific code like:
system("cls");
printf ("Testing...\n");
sleep(1);
system("cls");
Because in my program, i have hundreds of lines like these but i...
I haven't started to make my program simplier with the char map, since i wanted to finish the base program. Here it is. Im pretty sure i can cut the code down by alot, any tips to do so?
#ifdef...
could i just make each square on the map a different character, like a,b,c etc and have a case for every character, so i dont have like the same description for forest each time i land on the forest...
ugg still stuck, not sure what to do :P
Wow thanks for the help :) If I only want the map to be half the size in width as yours what would I need to changed the define max size to? Also how would I use the coordinates? Like if player 1 ==...
Also if I made a char map, how would I track the position of the player?
The game is for a school project so i can only use GNU. Would i need PDCurses to do the char map u did?
Can u link me? I can't find it
Oh and also, does anyone know a good c compiler program for windows? I am currently using dev c++ but some of the c commands dont work with it. I have a netbook that uses linux which runs this code...
What do i replace with this? lol im a real beginner with this stuff, and i really want to shorten my code :P
Thanks everyone for the responses :) I really like your idea of the char map, but i dont really know that much about c :P im not 100% sure how to use the map though. could you provide insight? This...
so far i have this. And i have some errors. Any suggestions to improve it? My C knowledge is limited :P
#include <stdio.h>
char character = 'q';
int main()
{
system("clear");
printf...