Search:

Type: Posts; User: computermajor12

Search: Search took 0.00 seconds.

  1. Replies
    6
    Views
    1,181

    If int num_students is in my strucutre, I'm...

    If int num_students is in my strucutre, I'm confused at why that doesn't mean I have a variable...I thought by putting int num_students in my structure would mean I do have a variable num_students......
  2. Replies
    6
    Views
    1,181

    Thanks salem, I fixed that to ...

    Thanks salem, I fixed that to
    for(crp->num_students=0; num_students<100; ++num_students)

    I'm still recieving this error when I try to compile it...:

    project_test.c: In function...
  3. Replies
    6
    Views
    1,181

    Any help would be appreciated

    Hello, I'm writing a program that allows an user to enter student information, and then will hold the information and will allow the user to "delete a student", "add a student", show class (which...
  4. Replies
    3
    Views
    792

    When I change my code to this: void...

    When I change my code to this:

    void add_a_person(struct Classroom* crp){
    for(crp.num_students=0;num_students<100;++num_students)
    {
    crp[num_students].fill_person=num_students+1;
    struct...
  5. Replies
    3
    Views
    792

    while loop menu

    I've been working on this code and I'm really trying to finish it ASAP. My project is to write a program that stores student input and creates a "classroom"... My main() should be a while loop that...
  6. Replies
    3
    Views
    1,302

    So i updated my code and added to my add_a_person...

    So i updated my code and added to my add_a_person function but it isn't compiling because it says I have not declared num_students but I delcare it in my structure?
    Also, does my delete_a_person...
  7. Replies
    3
    Views
    1,302

    Program not running correctly

    I'm doing the following project:

    The classroom should be represented as a structure:

    struct Classroom {
    int num_students;
    struct Person student[100];
    };
    The project requires the...
  8. Replies
    3
    Views
    978

    output in C

    I've written a program for collecting data of students, it compiles and runs but I've called my show_person function and it is not showing it when I run it?

    3 #include<stdio.h> 4 struct Person...
  9. Replies
    9
    Views
    3,317

    I got my code to compile, but now when I run it,...

    I got my code to compile, but now when I run it, It prompts me to enter the students name, and when I do that, and press enter I get
    "segmentation fault"
    and the program ends...
  10. Replies
    9
    Views
    3,317

    Thank you camel-man. Now should my struct be in...

    Thank you camel-man.
    Now should my struct be in my main?
    I was going to have my main be like this:


    int main()
    {
    struct Person* per;
    fill_person(&per);
    show_person(&per);
  11. Replies
    9
    Views
    3,317

    Thank you Camel-man. After fixing those issues I...

    Thank you Camel-man.
    After fixing those issues I am still getting this error, I've looked into fgets and from what I understand it has to pass 3 arguments


    assignment12.c: In function...
  12. Replies
    9
    Views
    3,317

    first time using C

    Usually I use C++ but was recently given an assignment in C...
    here's the assignment:
    Declare a structure named Person. The Person structure should have the following fields:


    char name[100];...
Results 1 to 12 of 13