User Profile

Collapse

Profile Sidebar

Collapse
Transmit
Transmit
Last Activity: Jan 15 '07, 07:56 PM
Joined: Dec 4 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Transmit
    started a topic returning a char table (C)
    in C

    returning a char table (C)

    What kind of function would I need to have to return a table that contains a string.

    example:
    int filltable(param eter){
    char table[20] = {0};

    return table[]
    }
    See more | Go to post

  • Transmit
    started a topic qsort example please!
    in C

    qsort example please!

    Hello!

    Can someone give me a really simple example of qsort?
    I just need it to sort an array that is 10 integers big.

    I tried this:
    http://www.phim.unibe. ch/comp_doc/c_manual/C/EXAMPLES/qsort1.c

    but it gives me an error here at the qsort part.


    Thanks in advance!!!
    See more | Go to post

  • Transmit
    started a topic Declaring a table with unknown size (C)
    in C

    Declaring a table with unknown size (C)

    Hi everyone,

    I need to declare an array of chars but I don't know how big it will be from the start of the program.

    example:
    Someone gives me a name:
    John
    Array gets filled with john
    [j][o][h][n]

    so the size of this array is 4 chars (not more)!

    how can I declare an array that way?
    I tried: char tablename[] but that doesn't seem to work.

    ...
    See more | Go to post

  • Transmit
    replied to Timers to take msg
    in C
    this is a function for a timer:

    Code:
    void sleep(unsigned int mseconds){
    	 clock_t goal = mseconds + clock();
    	 while (goal > clock());
    }
    usage:

    Code:
    printf("The program is now waiting 5 seconds and will start the program after");
    sleep(5000)
    startprogram();
    
    if (variable == 1){
      printf("It started");
    }else{
      printf("It
    ...
    See more | Go to post

    Leave a comment:


  • Transmit
    started a topic Sound in C
    in C

    Sound in C

    Is there a way to have music playing in the background (from the program created in C) while running the program??

    Thanks in advance!!
    See more | Go to post

  • Transmit
    replied to Opening and outputting a text file
    in C
    Here you are then:

    Code:
    #include <stdio.h>
    #include <stdlib.h> /*nodig voor random()*/
    #include <time.h> /*gaat ermee voor zorgen dat niet telkens dezelfde getallen worden opgeroepen*/
    #include <windows.h>
    
    int welkomtekst(void);
    int keuze1(void);
    int startspel(void);
    int moeilijkheidsgraad(void);
    int highscores(void);
    int eerstekeeropgestart =
    ...
    See more | Go to post

    Leave a comment:


  • Transmit
    replied to Opening and outputting a text file
    in C
    well the program is kinda big and yes I typed:

    #include <stdlib.h>

    on top!
    See more | Go to post

    Leave a comment:


  • Transmit
    replied to Opening and outputting a text file
    in C
    sorry for double post but the 5 minutes expired:

    I put the code I just put above ^^ in a switch case statement

    so it would look like this:

    switch(keuze){
    case 1:
    system("pathto. txtfile");
    break;
    case 2:
    ...
    }

    I guess that's totally wrong :D Can you specify how to do it a bit more? Thanks man you're being a great help!!!
    ...
    See more | Go to post

    Leave a comment:


  • Transmit
    replied to Opening and outputting a text file
    in C
    I put this:
    system("C:\\Sch ool\\Gestructur eerd programmeren\\P rogrammeerproje ct\\Handleiding C.txt");

    and it gave me this error:
    linking error: undefined symbol _system in module simon.C

    any thoughts?
    See more | Go to post

    Leave a comment:


  • Transmit
    replied to Opening and outputting a text file
    in C
    Thanks, but I actually meant opening the .txt file like when you would double click on it.
    Sorry if I didn't explain well!

    and do you know how to close the whole program? I tried abort() but that didn't gave me what I wanted!

    thx already!!
    See more | Go to post

    Leave a comment:


  • Transmit
    started a topic Opening and outputting a text file
    in C

    Opening and outputting a text file

    Hi everyone,

    I want to open a .txt file and just show it.Not for reading or anything but just showing it when people enter a certain number.
    Can anyone tell me how to do this?

    and is there a command to close all windows of the application?

    IM DOING C++ IN BORLAND
    See more | Go to post
No activity results to display
Show More
Working...