Search:

Type: Posts; User: yxunomei

Page 1 of 5 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    2,155

    text editor man... ppl are so lazy to google...

    text editor

    man... ppl are so lazy to google these days...
  2. try this #include int...

    try this

    #include <stdio.h>

    int functionA(int x) {
    return x * 2;
    }

    int functionB(int y) {
    return functionA(y) * 2;
  3. Replies
    14
    Views
    2,671

    i've done this in C... searching for modus of...

    i've done this in C... searching for modus of given data, here's the reference implementation
    [~/MISC/C] ./a.out
    1 3 4 3 3 4 5 6 3 2 3 4 3 4 5
    The mode is 3
    [~/MISC/C] ./a.out
    3 3 3 3 3 4 4 4 4...
  4. Replies
    12
    Views
    2,189

    then i believe the proper question should be...

    then i believe the proper question should be "what's bad if i run that code"
  5. Replies
    11
    Views
    2,338

    lol... just what I expected ;) ok, here's the...

    lol... just what I expected ;)

    ok, here's the calloc version

    char *s;

    s = calloc(array_size, size_of_var_type); // in your case : calloc(10, 1)

    return 0;
  6. Replies
    11
    Views
    2,338

    yes you can do that char *s; if((s = (char...

    yes you can do that

    char *s;

    if((s = (char *) malloc(size_you_need)) == NULL) {
    fprintf(STDERR, "not enough memory\n");
    exit(0);
    }
  7. Replies
    17
    Views
    2,102

    this thing double averageFunc(int...

    this thing


    double averageFunc(int integerVariable[], int noOfArray)
    {
    for (int i = 0; i < noOfArray; i++)
    {
    allNumbers = allNumbers + integerVariable[i]; // initialize...
  8. Replies
    11
    Views
    2,338

    it will malloc, in a sense that the OS will try...

    it will malloc, in a sense that the OS will try and allocate memory block for your array... you can't check it by yourself... unless if you are talking about dynamic data structure
  9. >Problem about how to choose ?Multi(or 2+ more...

    >Problem about how to choose ?Multi(or 2+ more file)-file to output from File >Data O/I in C programming.
    >Thank[b]'s!
    typos?
    fopen, fscanf
  10. Replies
    16
    Views
    1,838

    the thread you went was talking about C... i know...

    the thread you went was talking about C... i know only a bit of C++, been using C, tho the syntax is almost the same... but I don't know atoi equivalent for C++

    it should be <iostream> (without...
  11. Thread: Structs in C

    by yxunomei
    Replies
    10
    Views
    1,360

    have you compiled and see it yourself? tho i saw...

    have you compiled and see it yourself? tho i saw some problems with your struct definition
  12. Replies
    17
    Views
    2,102

    int x[10]; for (int i = 0; i

    int x[10];
    for (int i = 0; i<10; i++)
    { while(cin >> x[i]) // no need to loop, just a single cin
    { // not neccessary
    cout << x << "\n";
    } // not neccessary
  13. Replies
    17
    Views
    2,102

    ah ic... sorry, was my first C++ program.. been...

    ah ic... sorry, was my first C++ program.. been using C :D
  14. Replies
    17
    Views
    2,102

    you might find this interesting, tho i'm using...

    you might find this interesting, tho i'm using int


    #include <iostream>

    using namespace std;

    int main() {
    int i;
  15. Replies
    6
    Views
    1,354

    >I have a bunch of variables declared at the top...

    >I have a bunch of variables declared at the top of my main function. Is there a way I can call a function without creating a mess like the one below?

    yes you can, by making the required...
  16. Thread: split file

    by yxunomei
    Replies
    4
    Views
    2,332

    what have you done so far? use fopen if you want...

    what have you done so far? use fopen if you want to open the file, put the content into a buffer, and save it per 30000 byte using loop....

    that's if you want the hint...
  17. Replies
    10
    Views
    1,512

    rite... u have to put spaces "1 0 1 1 0"

    rite... u have to put spaces "1 0 1 1 0"
  18. Replies
    7
    Views
    1,719

    void run (char cur[]) { char *param[MAX]; //...

    void run (char cur[])
    {
    char *param[MAX]; // this is like saying,
    // I want to have a pointer to a string
    // are you sure you know what you are doing?...
  19. Thread: X and Y

    by yxunomei
    Replies
    4
    Views
    1,306

    place everything from the map file into a 2 D...

    place everything from the map file into a 2 D arrays and whenever you want to put the player relating to the screen, say (15, 5)

    do something like

    mapStuff[15][5] = 'X' // suppose we use 'X' to...
  20. Replies
    8
    Views
    5,072

    does that even compile?

    does that even compile?
  21. Replies
    28
    Views
    28,085

    I don't know, but I find my OS to be VERY...

    I don't know, but I find my OS to be VERY interactive...
    Everyone here has the intention of giving them their idea... If you find their way of expressing their thought a bit offending... then I'd...
  22. Replies
    6
    Views
    2,257

    is this what they call de javu?

    is this what they call de javu?
  23. Replies
    10
    Views
    1,512

    i did this #include int main() { ...

    i did this
    #include<stdio.h>

    int main() {
    char s[10];

    fgets(s, 10, stdin);

    int a;
    int b;
  24. Replies
    6
    Views
    1,332

    > The issue I have is that sample0 is a structure...

    > The issue I have is that sample0 is a structure of memory and I don’t know how to point it to sampleX where X is a variable number in a loop and have it work.

    structure of memory? do you mean...
  25. Replies
    28
    Views
    28,085

    alrite2, don't get angry now... :D here's wat i...

    alrite2, don't get angry now... :D here's wat i got from localtime manual page



    NAME
    asctime, ctime, gmtime, localtime, mktime, asctime_r, ctime_r, gmtime_r, localtime_r - transform...
Results 1 to 25 of 106
Page 1 of 5 1 2 3 4