Search:

Type: Posts; User: pr0ficient

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    3,105

    Using getch()

    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...
  2. Replies
    5
    Views
    1,477

    Another Pointer Question

    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] =...
  3. Replies
    17
    Views
    53,318

    How was I able to compile my menu without...

    How was I able to compile my menu without including stdlib then?
  4. Thread: scanf

    by pr0ficient
    Replies
    6
    Views
    1,105

    char array[10]; scanf("%s",&array);

    char array[10];
    scanf("%s",&array);
  5. Replies
    2
    Views
    1,585

    The way I have always used is: srand ( time(0)...

    The way I have always used is:

    srand ( time(0) );
    var = (int) (rand() / (RAND_MAX + 1.0) * (high - low + 1);

    Example:



    #include <stdio.h>
  6. Replies
    13
    Views
    2,267

    Why not believe it in an 'online kind of way'. If...

    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...
  7. Replies
    12
    Views
    1,218

    I thought that if you assigned an int within a...

    I thought that if you assigned an int within a function it is automatically set to 0.
  8. Replies
    13
    Views
    2,267

    He probably got it from: ...

    He probably got it from:

    http://www.cprogramming.com/cboard/member.php?s=&action=getinfo&userid=3391
  9. Replies
    17
    Views
    53,318

    Interesting Way

    #include <stdio.h>

    int menu(int MenuChoice);

    int main()
    {
    int WhereInMenu;
    char KeyTouched;

    WhereInMenu = 1;
  10. Replies
    13
    Views
    2,267

    http://sources.redhat.com/cygwin/ ...

    http://sources.redhat.com/cygwin/

    http://www.gnu.org
  11. Thread: The Best OS

    by pr0ficient
    Replies
    33
    Views
    6,306

    Poll: You should have put a general 'Linux' selection...

    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?
  12. Thread: Suggestion

    by pr0ficient
    Replies
    1
    Views
    1,860

    Suggestion

    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...
  13. Replies
    12
    Views
    1,218

    Okay

    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:...
  14. Replies
    12
    Views
    1,218

    Still Not Working Fully

    The code as of now is:

    #include <stdio.h>

    char * getstring(char * string,int max_chars)
    {
    char responce;
    char * pstring;
    pstring = string;
    int number;
  15. Replies
    12
    Views
    1,218

    Getline help

    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)
    {
    ...
  16. Thread: Arrays

    by pr0ficient
    Replies
    2
    Views
    837

    Answer

    You can do something like this.

    int *function(char *array);

    int main()
    {
    char fname[20];

    printf("Please Enter Your First Name: ");
    scanf("%s",&fname);
Results 1 to 16 of 16