Search:

Type: Posts; User: esmeco

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    9,328

    Passing a linked list to a function

    I am trying to pass a pointer to a linked list to a function. I want the function to modify the linked list.
    In the function, If I print out a member of the structure,it works,but if I try to print...
  2. Replies
    0
    Views
    1,071

    Visual Studio IntelliSense problems

    I'm using Visual Studio and I'm having a strange problem: each time i try to access the members of a structure with the dot or -> notation,some members don't show up and in some even show up members...
  3. Replies
    15
    Views
    7,722

    I've added in the add_employee function to test...

    I've added in the add_employee function to test if the code worked




    int add_employee(Employee **employee,int n_employees)
    {
    int i;

    n_employees++;
  4. Replies
    15
    Views
    7,722

    Thank you!I was struggling with that for a long...

    Thank you!I was struggling with that for a long time!
    Just one last question: if I wanted to print the contents of each array,how would it look like?Currently I have:



    ...
  5. Replies
    15
    Views
    7,722

    I've tried what you said,isolating it,but the...

    I've tried what you said,isolating it,but the "Unhandled Exception...Access Violaton" persists and it only appears when i try to add a second employee...The line of code where it breaks for the...
  6. Replies
    15
    Views
    7,722

    Unfortunately, no as the number of employees is...

    Unfortunately, no as the number of employees is undefined and that for cycle would limit the call to the function add_employee to 5 times.
  7. Replies
    15
    Views
    7,722

    The Employee structure in Employee.h: ...

    The Employee structure in Employee.h:



    typedef struct employee
    {
    char name[100];
    int id;

    }Employee;
  8. Replies
    15
    Views
    7,722

    Yes,it's C. Here it is the main function: ...

    Yes,it's C.
    Here it is the main function:



    void main()
    {
    int n_employees=0;
    Employee *emp=NULL;
  9. Replies
    15
    Views
    7,722

    Passing a dynamic array to a function

    Hello!
    I'm having some problems with dynamic arrays passed by reference.
    I have an add_employee() function which receives a pointer to a dynamic array of Employee structures.
    The purpose of this...
  10. What is the difference between socket functions write() and send()?

    Hello!

    Well,like the title says,I was wondering what is the difference between those functions.Don't they do the exact same thing,write data to socket?
  11. Replies
    2
    Views
    1,702

    Question regarding typedef

    Hello!

    I have a question regarding typedef use.Why can't we declare a structure like this:




    typedef struct
    { int value;
    element* next;
  12. Replies
    2
    Views
    1,210

    Array of structures problems

    Hello!

    I'm currently working on a project and I'm having a bit of an hard time with two functions in specific:

    Function 1:In this function I want the doctor's number of patients to increase...
  13. Not that I want to,but I must use only pointers!

    Not that I want to,but I must use only pointers!
  14. Problems with pointer to multidimensional array

    I'm having some problems iterating through a bidimensional array,as I cn't print all the elements on a matrix form.Here's my code:



    #include <stdio.h>
    #include <string.h>
    #define L1 3...
  15. Replies
    7
    Views
    1,406

    Thanks for the reply!I guess I really had the...

    Thanks for the reply!I guess I really had the containing backwards!
    So,basically can we look at structures like we look at classes?Like,for example, ask "questions" like Person IS-A Doctor ,and if...
  16. Replies
    7
    Views
    1,406

    Help needed with structures

    I'm beggining to work on a project for school which consists in creating a program for managing the pacients and doctors of a clinic.Doctors would have their personal...
  17. Replies
    47
    Views
    8,853

    ...

    Thank you for the tips!
    It does work now...But,just one question,why do they get out of scope?
  18. Replies
    47
    Views
    8,853

    ..

    Thank you very much for the explanation and help!Here I've changed a bit the main function and class autoreg taking into account what you've said.
    When compiling I get 2 errors of linkage saying the...
  19. Replies
    47
    Views
    8,853

    ...

    Could anyone help me on this?
  20. Replies
    47
    Views
    8,853

    ..

    This's my actual code...I'm having a bit of difficulty about some coding: in class autoreg defined de <map> as public...Should I put them has private instead?Another thing,once I have in autoreg a...
  21. Replies
    47
    Views
    8,853

    ...

    I've read all this and I must say it will give me a giant leap ahead on my work!Very very insightful,thank you so much for all the work!Later tonight,I'll post my code so that you,if possible,give me...
  22. Replies
    47
    Views
    8,853

    ...

    Just one more question that has been aching my head: why would I want to use maps instead of vectors in this case?What are the differences?
  23. Replies
    47
    Views
    8,853

    Also, if I wanted to,after storing the vehicles'...

    Also, if I wanted to,after storing the vehicles' and owners' information, list the owners' information and their owned vehicles how would I do it in terms of coding?
  24. Replies
    47
    Views
    8,853

    ...

    Well,the problem explicitaly says that a car just have one owner...So,regarding to what you've said you could have the association defined by vectors like this:




    class Owner { ... }

    class...
  25. Replies
    47
    Views
    8,853

    So if I understood correctly it would be...

    So if I understood correctly it would be something like:




    class Owner
    {

    private:
    ...
Results 1 to 25 of 37
Page 1 of 2 1 2