I am familiar with using getch() in a windows C compiler, but am having trouble while using it in gcc. I am attempting to use it to have my program wait for an enter keystroke, this is very easy to...
Type: Posts; User: pr0ficient
I am familiar with using getch() in a windows C compiler, but am having trouble while using it in gcc. I am attempting to use it to have my program wait for an enter keystroke, this is very easy to...
I struggle understanding why the following is illegal:
char *pointer = "hello";
pointer[2] = 'L';
yet putchar(pointer[2]); and the following is legal:
char blah[] = "hello";
blah[2] =...
How was I able to compile my menu without including stdlib then?
char array[10];
scanf("%s",&array);
The way I have always used is:
srand ( time(0) );
var = (int) (rand() / (RAND_MAX + 1.0) * (high - low + 1);
Example:
#include <stdio.h>
Why not believe it in an 'online kind of way'. If you are a female and tell me that you are a male, I will refer to you as a male....it's just a word...and a way to refer to another human being. If I...
I thought that if you assigned an int within a function it is automatically set to 0.
He probably got it from:
http://www.cprogramming.com/cboard/member.php?s=&action=getinfo&userid=3391
#include <stdio.h>
int menu(int MenuChoice);
int main()
{
int WhereInMenu;
char KeyTouched;
WhereInMenu = 1;
http://sources.redhat.com/cygwin/
http://www.gnu.org
You should have put a general 'Linux' selection to vote for. Mandrake and Caldera are not Linux's STRONG distro's. Also, wtf isn't BSD up there?
I am not sure if this board is interested or not, but I have some friends who run a message board for TekNap (A popular irc/napster client that is fully programmable). They were able to add a bit of...
Say I do getstring(ff,10). I want getstring to read all input until 'number' gets to 10 or if the enter key is pressed before that.
Example of what I would like it to do:
I run the function:...
The code as of now is:
#include <stdio.h>
char * getstring(char * string,int max_chars)
{
char responce;
char * pstring;
pstring = string;
int number;
I was wondering if someone could tell me what is wrong with this code and what I could do to fix it. It says Segmentation Fault when I run it.
char * getline(char * string,int max_chars)
{
...
You can do something like this.
int *function(char *array);
int main()
{
char fname[20];
printf("Please Enter Your First Name: ");
scanf("%s",&fname);