Search:

Type: Posts; User: Mikal

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    987

    Thanks! You're a life-saver.

    Thanks! You're a life-saver.
  2. Replies
    2
    Views
    987

    Serious template issues (!!!)

    I'm having issues accessing template member functions of a template base class from inside a template derived class. I've provided a minimalist example that shows the problem I have.


    #include...
  3. Thanks. That worked perfectly. I knew that I was...

    Thanks. That worked perfectly. I knew that I was thinking too complexly.
  4. I could make my code better but I'm okay with how...

    I could make my code better but I'm okay with how it is. I just want to know why the code I posted produces garbage at the end of salary and I'm good to go.
  5. void save(void){ int savecount = 0; FILE *fp;...

    void save(void){
    int savecount = 0;
    FILE *fp;
    char newline[1];
    newline[0] = '\n';
    fp = fopen("company.db", "wb");
    while (savecount < 20){
    strcpy (ints," ");
    strcpy (floats, " ...
  6. The main problem isn't the reading (which I have...

    The main problem isn't the reading (which I have now fixed), it's the fact that the writing is all screwy. Take a look at the attachment.
  7. class data { public: char last[31],...

    class data
    {
    public:
    char last[31], first[36];
    float salary;
    int yrhired;
    void display(void);
    void modify(void);
    data(void);
    }employee[20];
  8. Doing fwrite(&i, sizeof(int), 1, fp) and...

    Doing fwrite(&i, sizeof(int), 1, fp) and fwrite(&fl, sizeof(float), 1, fp), I get even stranger errors.
  9. Well, would there be any other way to write them...

    Well, would there be any other way to write them then using fwrite?
  10. Is there a convenient way to write ints & floats to a file in binary mode?

    I'm converting them to strings using sprintf then using fwrite but I'm getting strange errors so I figure there must be something simpler.
  11. my_library.h char ints[6]; char floats[20]; ...

    my_library.h

    char ints[6];
    char floats[20];

    void prompt(void);

    class data
    {
    public:
  12. I'm not sure what you mean but this particular...

    I'm not sure what you mean but this particular section of the code is inside of a header file that I made. I didn't post the entire code because it's fairly long. I just posted the code around the...
  13. error: expected unqualified-id before "while" (???)

    I got a very puzzling error message. I figured that the compiler might have thought that the semicolon after the void prompt (void) was a mistake and not an indication of a prototype however, even...
  14. Thanks, man. I knew it had to be something really...

    Thanks, man. I knew it had to be something really stupid like that.
  15. bestfitcircle.c:46: error: called object is not a function

    bestfitcircle.c:46: error: called object is not a function
    That is the error message that I get for the following C program.


    #include <stdio.h>
    #include <math.h>

    main() {
    int count,...
Results 1 to 15 of 16