Search:

Type: Posts; User: Drainy

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    1,524

    oh sorry, pass should be temp. I have been...

    oh sorry, pass should be temp. I have been cutting and pasting around to try and figure out what the error was complaining about.



    int len;
    char temp[15];
    char *ptr;

    get...
  2. Replies
    6
    Views
    1,524

    Pointer / Integer error

    Hi,

    I am trying to get my head around a warning, I have searched about but found no examples that are similar to my case.
    The warning I get on compiling is;
    assignment makes pointer from integer...
  3. Replies
    3
    Views
    2,101

    Thanks for the quick replies, have managed a...

    Thanks for the quick replies, have managed a solution using malloc.

    Thanks again.
  4. Replies
    3
    Views
    2,101

    Array size set by variable

    Hi,

    I am having issues compiling a program with cc on a fairly old unix system, I understand that I need to follow C standards strictly but I can find no way around this.


    array(int n)
    {
    int...
  5. Thread: Fork()

    by Drainy
    Replies
    1
    Views
    1,408

    Fork()

    Hi,

    I am currently having issue with a fork command I am issuing, I am attempting to use fork to create x number of identical processes however it is creating the required amount and then the...
  6. Thread: FILE Handling

    by Drainy
    Replies
    8
    Views
    1,750

    void showMenu(int x); int confirmFile(char...

    void showMenu(int x);
    int confirmFile(char *fn[]);
    int closeFile();

    char *fn[0];
    char *file[0];


    Sorry, poor effort on the code pasting! This is my prototyping and variable declarations....
  7. Thread: FILE Handling

    by Drainy
    Replies
    8
    Views
    1,750

    void showMenu(int x) { int option; //set...

    void showMenu(int x)
    {
    int option; //set variable for menu choice
    char rtn; //clear screen
    system("clear");

    printf("### 2 - Close File ###\n");

    printf("What would...
  8. Thread: FILE Handling

    by Drainy
    Replies
    8
    Views
    1,750

    FILE *fp; //This is declared at the very top of...

    FILE *fp; //This is declared at the very top of program. outside of any functions

    int main(int argc, char *argv[])
    {
    int x;

    if(argc == 1) //if only 1 entry in array then go to menu
    {...
  9. Thread: FILE Handling

    by Drainy
    Replies
    8
    Views
    1,750

    FILE Handling

    Hi,

    Hopefully a quick one.
    I have recently been doing some C Programming again after not doing any for 4-5years.

    So, I have gone a bit all out to make a program that does a little bit of...
  10. Replies
    3
    Views
    2,678

    Thats great thanks :)

    Thats great thanks :)
  11. Replies
    3
    Views
    2,678

    Character Array: If Null

    Hi,

    Im having a really simple problem.
    I have an if statement to check if an input from a user is empty or not, if it is then the program needs to take one course of action. if it isnt then it...
  12. Replies
    3
    Views
    3,489

    Sorted! (get it? sorted...) :D Cheers

    Sorted! (get it? sorted...) :D
    Cheers
  13. Replies
    4
    Views
    1,118

    Ok thanks, ill have a read up on that later :) ...

    Ok thanks, ill have a read up on that later :)

    Im completing a piece of work weeks before its due deliberately so I can sit back and refine it and spend some time improving it before hand in.
  14. Replies
    3
    Views
    3,489

    Array of Structures: Sorting

    Hi!

    Ok, I honestly have exausted my mind over this one.

    I have an array of 12 structures, each one has a name and several other double variables.

    I am trying to sort the entries in the...
  15. Replies
    4
    Views
    1,118

    Thanks! I used strcpy in the end.

    Thanks!

    I used strcpy in the end.
  16. Replies
    4
    Views
    1,118

    Error Message: Lvalue

    Hi,

    Sorry I keep getting an error and im not sure what it means;


    cc: Error: testfile.c, line 441: In this statement, "holders[pos].name" is not an
    lvalue, but occurs in a context that...
  17. Replies
    8
    Views
    1,399

    Ok, while ive solved one issue, its created...

    Ok, while ive solved one issue, its created another which I cant get my head around.


    void shop::select(int choice)
    {



    if (choice == 1)
    {
  18. Replies
    8
    Views
    1,399

    Thank you I just had it a bit mixed up in my...

    Thank you

    I just had it a bit mixed up in my head. :)
  19. Replies
    8
    Views
    1,399

    Apologies. That was a fairly dire explanation by...

    Apologies.
    That was a fairly dire explanation by myself

    ok.
    So if I had a header file called shop. Inside it was a definition for a class shop


    class shop {
    public:
  20. Replies
    8
    Views
    1,399

    Classes and objects

    Hi,

    Im really new to all this so apologies for any stupid questions but basically I have a program I am making.
    As its for a coursework piece I wont go into detail, however put simply there is a...
  21. Replies
    4
    Views
    2,461

    thats the one :D Cheers

    thats the one :D

    Cheers
  22. Replies
    4
    Views
    2,461

    Character Array copying

    Hi,

    Many thanks to hk_mp5kpdw for answering my previous post, was perfect thanks!

    Since this is a different problem I figured a different topic would be wise, this time it should be fairly...
  23. Replies
    3
    Views
    1,671

    Cheers that was perfect! Ive managed to...

    Cheers that was perfect!
    Ive managed to understand all that and apply it perfectly, its reading in and outputting just how I wanted.

    Sorry to be a pain but I just had a few more issues.
    How do I...
  24. Replies
    3
    Views
    1,671

    Passing a struct

    Hi,

    Im completely new here so please bear with me if I screw things up!

    Basically I have a piece of coursework along the lines of making a football league program in C. Looks easy in theory but...
Results 1 to 24 of 24