Search:

Type: Posts; User: officedog

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,026

    Loading data from a csv into a spreadsheet

    Hello

    Just wanted to sound people out on methods of transferring data from a .csv file into a custom built container which will provide the row and cell values of a spreadsheet. I'm working on a...
  2. Replies
    34
    Views
    3,708

    oh yes, missed that one. updated version: ...

    oh yes, missed that one. updated version:



    char * GC_GetUserInputDyanmicV2() {
    int baseSize = 64;
    char c;

    char * buffer = malloc(sizeof(char) * baseSize);
    if (buffer...
  3. Replies
    34
    Views
    3,708

    Really appreciate the help. Thanks. Just for...

    Really appreciate the help. Thanks. Just for completeness, I post the final(ish) version of the function. I made initial buffer as 64 to decrease likelihood of resizing


    char *...
  4. Replies
    34
    Views
    3,708

    OK I understand now. Thanks for keeping an eye...

    OK I understand now. Thanks for keeping an eye on this, sebastiani. Really appreciate it. So, the reason it worked fine was because my call to realloc didn't need to find a block of memory...
  5. Replies
    34
    Views
    3,708

    Thank you for this feedback. It's helping a lot...

    Thank you for this feedback. It's helping a lot to build some confidence

    I rewrote the function with the larger temporary storage, rather than resizing with realloc. It still seems to work OK. ...
  6. Replies
    34
    Views
    3,708

    I have worked further on my efforts at making a...

    I have worked further on my efforts at making a function which dynamically allocates memory to store a string from user input. This time I have added an extra bit so it will resize (I hope)...
  7. Replies
    34
    Views
    3,708

    Thanks again bithub. I think this is also what...

    Thanks again bithub. I think this is also what tabstop said on page 1. I get it now. The reason I didn't think it was necessary was because '\n' is the trigger for flushing to the input buffer. ...
  8. Replies
    34
    Views
    3,708

    Thanks for pointing this out bithub, I appreciate...

    Thanks for pointing this out bithub, I appreciate your help. Odd how such a simple loop can hurt the brain. I think you are right and have modified the code but putting index++ into the initial...
  9. Replies
    34
    Views
    3,708

    Just to add a progress notes: I have read up...

    Just to add a progress notes:

    I have read up on the difference between
    char array[] = "a string";
    and
    char * pString = "a string"

    Some of the things I read were
    a) "a string" is a string...
  10. Replies
    34
    Views
    3,708

    Thanks for replies. This a great forum, very...

    Thanks for replies. This a great forum, very helpful. I remember how painful arrays and array pointers are! I know this is all really basic stuff, and I appreciate the help to remember some of it....
  11. Replies
    34
    Views
    3,708

    Thanks kennedy. I seem to remember there was...

    Thanks kennedy. I seem to remember there was something quite useful with fgetc, but can't quite remember what it was exactly! Probably something to do with parsing the file, like csv's.

    Well...
  12. Replies
    34
    Views
    3,708

    Thanks for the replies. I am learning this very...

    Thanks for the replies. I am learning this very slowly. So, my understanding is that if I want to read input from the keyboard, because '\n' flushes the character strokes to the input buffer for...
  13. Replies
    34
    Views
    3,708

    Just a bit more experimentation with fgetc So...

    Just a bit more experimentation with fgetc

    So if I have a program which does this:



    int c;

    c = fgetc(stdin);
    c = fgetc(stdin);
  14. Replies
    34
    Views
    3,708

    that's really helpful, thanks for the speedy...

    that's really helpful, thanks for the speedy reply bithub.
  15. Replies
    34
    Views
    3,708

    Thank you for these comments. I am working...

    Thank you for these comments. I am working through this puzzle bit by bit, so hopefully it will come good in the end.

    Current problem I'm having is getting a good understanding of stdin and the...
  16. Replies
    34
    Views
    3,708

    Thanks for these quick replies MTK - I had...

    Thanks for these quick replies

    MTK - I had read somewhere about the difficulties in using scanf so have avoided this in the past. I had wanted such a generic 'whatever the user throws at us'...
  17. Replies
    34
    Views
    3,708

    Functions for C strings

    I am revisiting C strings, trying to get hang of the pesky things. I am attempting to make a set of functions to get, parse and manipulate strings etc.

    This is my first function which gets user...
  18. Replies
    1
    Views
    2,444

    literature database: help with planning

    Hello all
    I am trying to make a database which consists of references for my research project. Entries to the database consist of either journal articles, book chapters, books or websites. Each...
  19. Replies
    4
    Views
    1,117

    Thanks for the quick replies Tabstop and c++0x ...

    Thanks for the quick replies Tabstop and c++0x

    Interesting idea c++0x. Perhaps this would be OK as the class isn't that large. Just checking my understanding here - that the instance created...
  20. Replies
    4
    Views
    1,117

    Quick question - class declaration

    I'm working my way steadily into the C++ stuff and was wondering if the following is OK. (I'm making a clone of tertis for practice with SDL.)

    I have a class "Block" which will generate a random...
  21. Replies
    2
    Views
    1,206

    Brilliant. Thanks mike_g, the delay you...

    Brilliant. Thanks mike_g, the delay you suggested worked perfectly - quietened everything down a treat. After your post I put a cout << counter into the while loop and sure enough... laptop was...
  22. Replies
    2
    Views
    1,206

    SDL sending laptop loopy

    Hello all

    I'm just running through a few tutorials at the moment on SDL. I keep noticing that some of them make my laptop go into over-drive - lots of activity on the memory, even for simple...
  23. Thanks for the replies. I really appreciate...

    Thanks for the replies. I really appreciate these thoughts. I think I was trying to go too fast and your comments have helped me do a rethink and rather than refactor my original code, I'll do a...
  24. Thanks for the thought and link Salem. I have...

    Thanks for the thought and link Salem. I have SAMS 'C++ in 21 days...' - but it's not on that list you gave or the recommended books on this website - which makes me wonder if it's any good as an...
  25. Shifting from C to C++: help with conceptual stuff

    Hello all

    I'm trying to make a shift from C to C++. I'm starting by transferring some C code to C++ and in the process also get a better understanding of the underlying conceptual shift. Rather...
Results 1 to 25 of 77
Page 1 of 4 1 2 3 4