Search:

Type: Posts; User: beginner.c

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. A DB is one option. But what I had in mind was...

    A DB is one option. But what I had in mind was dynamically creating and destroying structs.

    Can someone point me in the right direction? I just don't know where to start.

    Thanks
  2. Help with simply dynamically named structs

    This does not compile, but what I'm trying to achieve is the ability to create a struct named "nn1" or any other name I choose at any point in my app.

    Can anybody help?



    #include <stdio.h>...
  3. Replies
    5
    Views
    1,256

    Is this what prelude is saying here struct...

    Is this what prelude is saying here


    struct Node *make_node ( void )
    {
    struct Node new_node = malloc ( sizeof *new_node );

    /* Error check and set a default state */

    return new_node;
  4. Replies
    3
    Views
    1,168

    Thanks for the replies. More to the point, see my...

    Thanks for the replies. More to the point, see my latest post...
  5. Replies
    5
    Views
    1,256

    Another struct questions

    I need to create an unknown number of structs in my application. Does anybody have any recommendations on doing this? I can easily do this inside a function, but then the struct I create inside that...
  6. Replies
    3
    Views
    1,168

    Quick struct question

    is this code valid?
    where intA is 0 - will this create a new structure called newStruct1?

    struct appA newStruct[intA + 1];
  7. Replies
    4
    Views
    1,248

    Got it thanks to ...

    Got it thanks to

    http://cboard.cprogramming.com/archive/index.php/t-5569.html


    #include <stdio.h>
    #include <stdlib.h>


    struct foo {
  8. Replies
    4
    Views
    1,248

    Thanks for the response, I figured that would be...

    Thanks for the response, I figured that would be the case. But how do I pass a struct as a pointer?
  9. Replies
    4
    Views
    1,248

    Passing struct

    Hi,

    I have the example code:

    #include <stdio.h>
    #include <stdlib.h>

    struct x
    {
    int a;
  10. Replies
    5
    Views
    1,294

    What if I have huge amount of text? Do I need to...

    What if I have huge amount of text? Do I need to aaa\nbbb\nccc\n ?? Is that the only way?
  11. Replies
    5
    Views
    1,294

    Storing multi line text

    Can someone tell me how I would store multi line text?

    eg


    char *text = "AAA [Date]
    BBB [Time]"

    or
  12. Running the 'strings' command on my binary executable

    Why can I see all of my variables and other data? Is it the way I'm compiling my app?
  13. Replies
    10
    Views
    16,510

    Is this a 'best practice' method? I didn't find...

    Is this a 'best practice' method? I didn't find much info on it on google.
  14. Replies
    10
    Views
    16,510

    What does this do/achieve?

    What does this do/achieve?
  15. Replies
    10
    Views
    16,510

    Thanks everybody, I've done as you've suggested...

    Thanks everybody, I've done as you've suggested but I'm still having issues. Now I'm getting 'redeclaration' errors, as a result of include the same header file more than once in my project. I think...
  16. Replies
    2
    Views
    945

    To free() or not to free()

    I'm relatively new to programming and have noticed whilst using certain API's that sometimes they tell you "this must be freed" and other times they don't mention it (but you should). My question is:...
  17. Replies
    10
    Views
    16,510

    extern struct

    Hi,

    I'm declaring my structs in a seperate .h file like this


    struct {

    ...

    } eQ1;
  18. Thread: Structs...

    by beginner.c
    Replies
    6
    Views
    1,173

    I think I feel more comfortable with one function...

    I think I feel more comfortable with one function for each struct rather than attempting anything else.

    Thanks for your help
  19. Thread: Structs...

    by beginner.c
    Replies
    6
    Views
    1,173

    Macgyver I believe you answered my question. Both...

    Macgyver I believe you answered my question. Both structs are different in the actual code. But they do have some members that are the same and I wanted to alter these using one function rather than...
  20. Thread: Structs...

    by beginner.c
    Replies
    6
    Views
    1,173

    Structs...

    How do I pass any of my structures to one particular function of mine? e.g


    struct {
    int a[4];
    int b[4];
    } EQ1;


    struct {
  21. Replies
    2
    Views
    910

    Dividing up my source code

    Hi,

    I'm writing an application and it's getting quite large. How do you divide it up into numerous source files?
  22. Replies
    12
    Views
    2,317

    Thanks a lot, I'll have a look through it.

    Thanks a lot, I'll have a look through it.
  23. Replies
    12
    Views
    2,317

    OK I must be missing something. Are you saying...

    OK I must be missing something. Are you saying that the resulting array will be the equivalent of

    char *smallArray[30];

    As I need each element to be able to store a string rather than a single...
  24. Replies
    12
    Views
    2,317

    Thanks, but is that increasing the number of...

    Thanks, but is that increasing the number of elements of the array? That's what I need to do.
  25. Replies
    12
    Views
    2,317

    Well that sucks. So how do I get a dynamic array...

    Well that sucks. So how do I get a dynamic array that I can resize as needed?
Results 1 to 25 of 30
Page 1 of 2 1 2