Oh why does the following code crash after all is done? And how does the copier in vector.push_back work while the commented out line looses the image in bms (after you uncomment it...)?
...
Type: Posts; User: kooma
Oh why does the following code crash after all is done? And how does the copier in vector.push_back work while the commented out line looses the image in bms (after you uncomment it...)?
...
http://freshmeat.net/projects/uconio/
Compiles just fine (after changing void main to int!) with DJGPP...
printf("%0.0f", f);
;-)
At least in gcc (DJGPP, etc):
name: makefile
type: make (in the same folder of course)
An object is bend, but the shape stays, so that the shortest distance between two points is 0.
Those black boxes are just characters that are not defined in the font-file, so dig up some characterers that aren't in the specific font file you're using and you'll get a blox or something...
Well, you can overload () for it and by that way treat it as 2D. And as I said, it's a long story...
I have a 1D array that is treated as a 2D (long story). Is there a way to get calls like array[i][j] work? operator[][] (int x, int y) gives me a syntax error...
char c;
c = getchar();
if(c == '1')
do_something();
else if(c == '2')
do_something_else();
else if(c == '3')
do_something_completely_different();
else
printf("Invalid option,...
2 - always.
About the original problem:
char dir[9];
cin >> dir;
if(strcmp(dir, "left"))
move left
You bastard... :)
If the user presses TAB the cursor will go forward (8-(CURRENT_COLUMN_IN_THE_SCREEN%8)) spaces. Now, when I press TAB and then backspace what would be the ideal thing to count how many columns...
char *s = "123";
int i = atoi(s);
char ........ = itoa(i);
Guess you could ask the Borland q here....
void check_flags(int moves[], int flags[], int win_lose);
should be
void check_flags(int moves[], int flags[][7], int win_lose);
First, you need a structuce:
struct Card
{
int number, value;
bool found;
};
With a computer other than my own, the biggest issue is the spacebar (usually they're bit more harder to push than my own) and loose keys...
If 0x0D is what I think it is - carriage return - try opening the file in binary mode.
And do switch your scanf() to fgets() for the sake stability!
if((ch == '\b') && (i > 0))
{
printf("\b \b");
i--;
sEntry[i] = '\0'; // Need this one?
}
ps.
No need for that kbhit()...
Ah! Could someone explain that code a bit? It works, alright but
char s[n];
getstr(s, m);
doesn't - not that it's a problem that is easily fixed with some polymorphzation but why.
And of course I have tried passing s from main o get_string:
void get_string(char *s, size_t maxlen)
{
...
if(s == NULL)
s = new char[str.size()+1];
Now I have a function const char *get_string(size_t maxlen) where the significant part according to this problem is like
vector<char> str;
...
char *s = new char[str.size()+1];
/* Copy...
What's this mystic __getc() that I see in libc's source (djlsr203.zip ) all the time? I can't find sources for that (and not really that anxious to download extra 20 megs). I guess that the...