Jump to content

Need help for this easily fixable C program

This is my C program for reading and displaying flight ticket details...

Pls compile and see the errors then help me fix it.... I am blankly saying this bcoz IDK how to explain my issue....
 

I promise this will be easier to fix than my last code..........

 

There are some pointer errors that's what I need to fix... 

 

Thanks BTW :D

 

#include <stdio.h>
typedef struct
{
    int ptickno;   
    char pname[100]; 
    char flightname[100];
    char fdate[100];
    char fltime[100];
    char class[100];
    char gate[100];
    char seat[100];
    char from[100];
    char to[100];
}passenger;

void input_output(passenger p1[100])
{
    int i=0;
    int n;
    
    int *ticket;
    
    ticket=&p1->ptickno;
    
    char *passname, *airplanename, *airdate, *airtime, *flclass, *airgate, *airseat, *flyfrom, *flyto;
    
    passname=p1->pname;
    airplanename=p1->flightname;
    airdate=p1->fdate;
    airtime=p1->fltime;
    flclass=p1->class;
    airgate=p1->gate;
    airseat=p1->seat;
    flyfrom=p1->from;
    flyto=p1->to;
    
    printf("ENTER THE NUMBER OF TICKETS YOU WANT TO ENTER : ");
    scanf("%d",&n);
 
    for(i=0;i<n;i++)
    {
    printf("\n********************************************");
    printf("\nENTRY FOR PASSENGER %d :", i+1);
    printf("\n\nEnter ticket number     : ");
    scanf("%d",&p1[i](*ticket));
    printf("Enter name of passenger : ");
    scanf("%s",p1[i](passname));
    printf("Enter name of flight    : ");
    scanf("%s",p1[i](airplanename));
    printf("Enter date of flight    : ");
    scanf("%s",p1[i](airdate));
    printf("Enter time of flight    : ");
    scanf("%s",p1[i](airtime));
    printf("Enter class             : ");
    scanf("%s",p1[i](flclass));
    printf("Enter gate              : ");
    scanf("%s",p1[i](airgate));
    printf("Enter seat              : ");
    scanf("%s",p1[i](airseat));
    printf("Enter from              : ");
    scanf("%s",p1[i](flyfrom));
    printf("Enter to                : ");
    scanf("%s",p1[i](flyto));
    printf("********************************************\n");
    }
  
    for(i=0;i<n;i++)
    {
       printf("\n********************************************");
       printf("\nTICKET DETAILS OF PASSENGER %d",i+1);
       printf("\n\nTICKET NUMBER     : %d",p1[i](*ticket));
       printf("\nNAME OF PASSENGER : %s",p1[i](passname));
       printf("\nNAME OF FLIGHT    : %s",p1[i](airplanename));
       printf("\nDATE OF FLIGHT    : %s",p1[i](airdate));
       printf("\nTIME OF FLIGHT    : %s",p1[i](airtime));
       printf("\nCLASS             : %s",p1[i](flclass));
       printf("\nGATE              : %s",p1[i](airgate));
       printf("\nSEAT              : %s",p1[i](airseat));
       printf("\nFROM              : %s",p1[i](flyfrom));
       printf("\nTO                : %s",p1[i](flyto));
       printf("\n********************************************");
    }
}

int main()
{

    passenger p[100],*pptr;
    
    pptr=&p[0];
    input_output(pptr);
    
    return 0;
}

 

Link to comment
Share on other sites

Link to post
Share on other sites

54 minutes ago, suriya2210 said:

void input_output(passenger p1[100])

No, you are declaring a variable instead of declaring what kind of variable the function should expect. Should be:

void input_output(passenger *p1)

 

54 minutes ago, suriya2210 said:

passname=p1->pname; airplanename=p1->flightname; airdate=p1->fdate; airtime=p1->fltime; flclass=p1->class; airgate=p1->gate; airseat=p1->seat; flyfrom=p1->from; flyto=p1->to;

Mmmno. Move these inside the loop and instead use:

p1[i]

 

54 minutes ago, suriya2210 said:

printf("\n\nEnter ticket number : ");
scanf("%d",&p1[i](*ticket));

 

Mmmno. Ticket points to a specific memory-address, not to an offset from p1. Also, you are trying to use the variable as if it was a function, which it isn't. Should be:

printf("\n\nEnter ticket number     : ");
scanf("%d",ticket);

 

EDIT: Oh, for the love of god, the forum's formatting-stuff and its bugs are making my head hurt. For fuck's sakes.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

Comments in the code

Spoiler

#include <stdio.h>
typedef struct
{
    int ptickno;   
    char pname[100]; 
    char flightname[100];
    char fdate[100];
    char fltime[100];
    char class[100];
    char gate[100];
    char seat[100];
    char from[100];
    char to[100];
}passenger;

void input_output(passenger p1[100]) //As was mentioned by others, this should be passenger *p1
{ //As a secondary note, you should be passing in the size of the array here, like you did in your previous topic you created
    int i=0;
    int n;
    
    //Purpose?  Why are you assigning all of the values to local variables...you can just write to them directly
    /*
    int *ticket;
    
    ticket=&p1->ptickno;
    
    char *passname, *airplanename, *airdate, *airtime, *flclass, *airgate, *airseat, *flyfrom, *flyto;
    
    passname=p1->pname;
    airplanename=p1->flightname;
    airdate=p1->fdate;
    airtime=p1->fltime;
    flclass=p1->class;
    airgate=p1->gate;
    airseat=p1->seat;
    flyfrom=p1->from;
    flyto=p1->to;*/ //Really don't think this is needed
    
    printf("ENTER THE NUMBER OF TICKETS YOU WANT TO ENTER : ");
    scanf("%d",&n);
 
    for(i=0;i<n;i++) //If the person writes over 100 you are in trouble...always check against the size of the array
    {
    printf("\n********************************************");
    printf("\nENTRY FOR PASSENGER %d :", i+1);
    printf("\n\nEnter ticket number     : ");
    scanf("%d",&p1[i](*ticket)); //Oh, this is...., just send in the pointer like you did above &(p1[i]->ptickno)
    printf("Enter name of passenger : ");
    scanf("%s",p1[i](passname)); //Same...just pass in the pointer p1[i]->pname
    printf("Enter name of flight    : ");
    scanf("%s",p1[i](airplanename)); //Repeat for all of yours
    printf("Enter date of flight    : ");
    scanf("%s",p1[i](airdate));
    printf("Enter time of flight    : ");
    scanf("%s",p1[i](airtime));
    printf("Enter class             : ");
    scanf("%s",p1[i](flclass));
    printf("Enter gate              : ");
    scanf("%s",p1[i](airgate));
    printf("Enter seat              : ");
    scanf("%s",p1[i](airseat));
    printf("Enter from              : ");
    scanf("%s",p1[i](flyfrom));
    printf("Enter to                : ");
    scanf("%s",p1[i](flyto));
    printf("********************************************\n");
    }
  
    for(i=0;i<n;i++) //Again check against the size of the array as well
    {
       printf("\n********************************************");
       printf("\nTICKET DETAILS OF PASSENGER %d",i+1);
       printf("\n\nTICKET NUMBER     : %d",p1[i](*ticket)); //Same as above...just access the things directly
       printf("\nNAME OF PASSENGER : %s",p1[i](passname));
       printf("\nNAME OF FLIGHT    : %s",p1[i](airplanename));
       printf("\nDATE OF FLIGHT    : %s",p1[i](airdate));
       printf("\nTIME OF FLIGHT    : %s",p1[i](airtime));
       printf("\nCLASS             : %s",p1[i](flclass));
       printf("\nGATE              : %s",p1[i](airgate));
       printf("\nSEAT              : %s",p1[i](airseat));
       printf("\nFROM              : %s",p1[i](flyfrom));
       printf("\nTO                : %s",p1[i](flyto));
       printf("\n********************************************");
    }
}

int main()
{

    passenger p[100],*pptr;
    
    pptr=&p[0];//Purpose?  Not sure why
    input_output(pptr); //input_output(p); works just as well
    
    return 0;
}

 

 

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

Ah, this is why programming has always been just too much for me.

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, andreeacrst said:

Ah, this is why programming has always been just too much for me.

It all depends on where you start.  While admittedly it isn't for everyone, languages like c# are far more forgiving and easier to learn.  c is more difficult to learn, because you need to think about memory/pointers etc

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

On 1/6/2021 at 4:51 AM, suriya2210 said:

This is my C program for reading and displaying flight ticket details...

Pls compile and see the errors then help me fix it.... I am blankly saying this bcoz IDK how to explain my issue....
 

I promise this will be easier to fix than my last code..........

 

There are some pointer errors that's what I need to fix... 

 

Thanks BTW :D

 


#include <stdio.h>
typedef struct
{
    int ptickno;   
    char pname[100]; 
    char flightname[100];
    char fdate[100];
    char fltime[100];
    char class[100];
    char gate[100];
    char seat[100];
    char from[100];
    char to[100];
}passenger;

void input_output(passenger p1[100])
{
    int i=0;
    int n;
    
    int *ticket;
    
    ticket=&p1->ptickno;
    
    char *passname, *airplanename, *airdate, *airtime, *flclass, *airgate, *airseat, *flyfrom, *flyto;
    
    passname=p1->pname;
    airplanename=p1->flightname;
    airdate=p1->fdate;
    airtime=p1->fltime;
    flclass=p1->class;
    airgate=p1->gate;
    airseat=p1->seat;
    flyfrom=p1->from;
    flyto=p1->to;
    
    printf("ENTER THE NUMBER OF TICKETS YOU WANT TO ENTER : ");
    scanf("%d",&n);
 
    for(i=0;i<n;i++)
    {
    printf("\n********************************************");
    printf("\nENTRY FOR PASSENGER %d :", i+1);
    printf("\n\nEnter ticket number     : ");
    scanf("%d",&p1[i](*ticket));
    printf("Enter name of passenger : ");
    scanf("%s",p1[i](passname));
    printf("Enter name of flight    : ");
    scanf("%s",p1[i](airplanename));
    printf("Enter date of flight    : ");
    scanf("%s",p1[i](airdate));
    printf("Enter time of flight    : ");
    scanf("%s",p1[i](airtime));
    printf("Enter class             : ");
    scanf("%s",p1[i](flclass));
    printf("Enter gate              : ");
    scanf("%s",p1[i](airgate));
    printf("Enter seat              : ");
    scanf("%s",p1[i](airseat));
    printf("Enter from              : ");
    scanf("%s",p1[i](flyfrom));
    printf("Enter to                : ");
    scanf("%s",p1[i](flyto));
    printf("********************************************\n");
    }
  
    for(i=0;i<n;i++)
    {
       printf("\n********************************************");
       printf("\nTICKET DETAILS OF PASSENGER %d",i+1);
       printf("\n\nTICKET NUMBER     : %d",p1[i](*ticket));
       printf("\nNAME OF PASSENGER : %s",p1[i](passname));
       printf("\nNAME OF FLIGHT    : %s",p1[i](airplanename));
       printf("\nDATE OF FLIGHT    : %s",p1[i](airdate));
       printf("\nTIME OF FLIGHT    : %s",p1[i](airtime));
       printf("\nCLASS             : %s",p1[i](flclass));
       printf("\nGATE              : %s",p1[i](airgate));
       printf("\nSEAT              : %s",p1[i](airseat));
       printf("\nFROM              : %s",p1[i](flyfrom));
       printf("\nTO                : %s",p1[i](flyto));
       printf("\n********************************************");
    }
}

int main()
{

    passenger p[100],*pptr;
    
    pptr=&p[0];
    input_output(pptr);
    
    return 0;
}

 

 

Fixed?

Spoiler

#include <iostream>
#include <cstdio>
#include <queue>

using namespace std;

std::string getInput_str(void);
int getInput_int(void);
bool contRunning(void);

struct flightInfo{
    int ticketNumber;
    std::string name;
    std::string flightName;
    std::string flightDate;
    std::string flightTime;
    std::string flightClass;
    std::string gateID;
    std::string seatID;
    std::string origin;
    std::string destination;
};

int main() {
    queue<flightInfo> flightLog;
    bool running = true;

    while(running) {
        flightInfo tmp;
        printf("\n********************************************");
        printf("\nENTRY FOR PASSENGER %d :", flightLog.size() + 1);
        printf("\n\nEnter ticket number     : "); tmp.ticketNumber = getInput_int();
        printf("Enter name of passenger : ");     tmp.name = getInput_str();
        printf("Enter name of flight    : ");     tmp.flightName = getInput_str();
        printf("Enter date of flight    : ");     tmp.flightDate = getInput_str();
        printf("Enter time of flight    : ");     tmp.flightTime = getInput_str();
        printf("Enter class             : ");     tmp.flightClass = getInput_str();
        printf("Enter gate              : ");     tmp.gateID = getInput_str();
        printf("Enter seat              : ");     tmp.seatID = getInput_str();
        printf("Enter from              : ");     tmp.origin = getInput_str();
        printf("Enter to                : ");     tmp.destination = getInput_str();
        printf("********************************************\n");
        flightLog.push(tmp);
        printf(   "cont? [y/n]: "); running = contRunning();
    }

    unsigned int _size = flightLog.size();
    while(!flightLog.empty()) {
        flightInfo tmp = flightLog.front();     flightLog.pop();
        printf("\n********************************************");
        printf("\nTICKET DETAILS OF PASSENGER %d", _size - flightLog.size());
        printf("\n\nTICKET NUMBER     : %d",    tmp.ticketNumber);
        printf("\nNAME OF PASSENGER : %s",      tmp.name.c_str());
        printf("\nNAME OF FLIGHT    : %s",      tmp.flightName.c_str());
        printf("\nDATE OF FLIGHT    : %s",      tmp.flightDate.c_str());
        printf("\nTIME OF FLIGHT    : %s",      tmp.flightTime.c_str());
        printf("\nCLASS             : %s",      tmp.flightClass.c_str());
        printf("\nGATE              : %s",      tmp.gateID.c_str());
        printf("\nSEAT              : %s",      tmp.seatID.c_str());
        printf("\nFROM              : %s",      tmp.origin.c_str());
        printf("\nTO                : %s",      tmp.destination.c_str());
        printf("\n********************************************");
    }
    return 0;
}

std::string getInput_str(void) {
    char buffer[1024]{'\0'};
    scanf("%s",buffer);
    return std::string(buffer);
}

int getInput_int(void) {
    int buffer = 0;
    scanf("%d",&buffer);
    return buffer;
}

bool contRunning(void) {
    std::string _tmp = getInput_str();
    if(_tmp[0] == 'y') return 1;
    else return 0;
}

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

10 hours ago, RandleMcmurphy said:

Fixed?

You used C++ instead of C.  If you use C++, might as well use std::cout and other C++ constructs.

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, wanderingfool2 said:

You used C++ instead of C.  If you use C++, might as well use std::cout and other C++ constructs.

I did use C++, I should have made that clear so the OP wasn't confused.

and using <cstdio> is perfectly valid, its still technically a part of C++.

Spoiler

book.thumb.png.85e37cc9b3333586fe996bcd20437902.png

You should post a code snip-it for comparison, adding relevant content will benefit everyone.

Link to comment
Share on other sites

Link to post
Share on other sites

On 1/12/2021 at 7:23 PM, RandleMcmurphy said:

I did use C++, I should have made that clear so the OP wasn't confused.

and using <cstdio> is perfectly valid, its still technically a part of C++.

I never said it wasn't valid...I was just saying, if you are going to switch from C to C++ in a solution you might as well be using the C++ alternatives (which also can be safer)

 

e.g.

void unsafe() { //When input is 123456789
	char buff[9];
    scanf("%s", buff); //Buffer overflow's can exist
}

void cppsafe() { //c++ makes reading in safer
	std::string buff;
    std::cin >> buff;
}

 

My post was mostly about the fact that you said fixed but used C++, but didn't use anything that really benefited the solution (in my opinion).  If you are going to be using Strings to store, read in and print out data might as well use the C++ counterparts...otherwise a C solution would just make more sense in that you have less overhead of the string class and converting between the types.

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, wanderingfool2 said:

less overhead of the string class and converting between the types

Not a big deal, string::c_str just gives you a pointer to the underlying data. On the other hand, you have different fingers.. ohhh i mean, a reallocation will mes things up. This was bad, I know :D

ಠ_ಠ

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, shadow_ray said:

Not a big deal, string::c_str just gives you a pointer to the underlying data. On the other hand, you have different fingers.. ohhh i mean, a reallocation will mes things up. This was bad, I know :D

Using converting between types might not have been the wisest choice of words from me.  For myself, it just makes things more cumbersome using std::string but then using the c methods of printing/reading.  It makes more sense to use stdout and stdin...or just writing the thing in c (just preference, but c code for this would look cleaner).  The copy constructor -might- be called when reading in (depends on the compiler and which C++ standard you are using).  Actually in this case, it is read into a buffer, then the buffer is sent into the std::string (which it would have to copy the buffer), and then potentially calling the copy constructor with the return.  It might not be a big deal, but it's still something to think about.

 

I still am by the same opinion, if one chooses to switch to C++ and use things like std::string, it makes sense to use the modern equivalents (otherwise for myself it's just adding additional overhead while not getting any benefits, especially the overflow situation)

 

*quick edit:  Actually I tried running a quick little test, where it's using c vs the cpp method...just scanning and putting it directly into a char* was about 32% faster than...which actually correlates to a similar question on stackoverflow https://stackoverflow.com/questions/21946447/how-much-performance-difference-when-using-string-vs-char-array

So I'm guessing the 32% is roughly accurate....not saying that it isn't good to use...just saying that there isn't a point in using std::string if one doesn't utilize the features afforded to it (because it doesn't necessarily keep the code cleaner)

3735928559 - Beware of the dead beef

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, wanderingfool2 said:

I never said it wasn't valid...I was just saying, if you are going to switch from C to C++ in a solution you might as well be using the C++ alternatives (which also can be safer)

 

e.g.



void unsafe() { //When input is 123456789
	char buff[9];
    scanf("%s", buff); //Buffer overflow's can exist
}

void cppsafe() { //c++ makes reading in safer
	std::string buff;
    std::cin >> buff;
}

 

My post was mostly about the fact that you said fixed but used C++, but didn't use anything that really benefited the solution (in my opinion).  If you are going to be using Strings to store, read in and print out data might as well use the C++ counterparts...otherwise a C solution would just make more sense in that you have less overhead of the string class and converting between the types.

I completely agree, 90% of the C++ alternatives are safer, and switching between types is a pain.

 

void see_safe() { //When input is 123456789
	char buff[9];
    scanf("%8s", buff); //Buffer overflow's can't exist
}

 

Link to comment
Share on other sites

Link to post
Share on other sites

On 1/6/2021 at 4:51 AM, suriya2210 said:

This is my C program for reading and displaying flight ticket details...

Pls compile and see the errors then help me fix it.... I am blankly saying this bcoz IDK how to explain my issue....
 

I promise this will be easier to fix than my last code..........

 

There are some pointer errors that's what I need to fix... 

 

Thanks BTW :D

 


#include <stdio.h>
typedef struct
{
    int ptickno;   
    char pname[100]; 
    char flightname[100];
    char fdate[100];
    char fltime[100];
    char class[100];
    char gate[100];
    char seat[100];
    char from[100];
    char to[100];
}passenger;

void input_output(passenger p1[100])
{
    int i=0;
    int n;
    
    int *ticket;
    
    ticket=&p1->ptickno;
    
    char *passname, *airplanename, *airdate, *airtime, *flclass, *airgate, *airseat, *flyfrom, *flyto;
    
    passname=p1->pname;
    airplanename=p1->flightname;
    airdate=p1->fdate;
    airtime=p1->fltime;
    flclass=p1->class;
    airgate=p1->gate;
    airseat=p1->seat;
    flyfrom=p1->from;
    flyto=p1->to;
    
    printf("ENTER THE NUMBER OF TICKETS YOU WANT TO ENTER : ");
    scanf("%d",&n);
 
    for(i=0;i<n;i++)
    {
    printf("\n********************************************");
    printf("\nENTRY FOR PASSENGER %d :", i+1);
    printf("\n\nEnter ticket number     : ");
    scanf("%d",&p1[i](*ticket));
    printf("Enter name of passenger : ");
    scanf("%s",p1[i](passname));
    printf("Enter name of flight    : ");
    scanf("%s",p1[i](airplanename));
    printf("Enter date of flight    : ");
    scanf("%s",p1[i](airdate));
    printf("Enter time of flight    : ");
    scanf("%s",p1[i](airtime));
    printf("Enter class             : ");
    scanf("%s",p1[i](flclass));
    printf("Enter gate              : ");
    scanf("%s",p1[i](airgate));
    printf("Enter seat              : ");
    scanf("%s",p1[i](airseat));
    printf("Enter from              : ");
    scanf("%s",p1[i](flyfrom));
    printf("Enter to                : ");
    scanf("%s",p1[i](flyto));
    printf("********************************************\n");
    }
  
    for(i=0;i<n;i++)
    {
       printf("\n********************************************");
       printf("\nTICKET DETAILS OF PASSENGER %d",i+1);
       printf("\n\nTICKET NUMBER     : %d",p1[i](*ticket));
       printf("\nNAME OF PASSENGER : %s",p1[i](passname));
       printf("\nNAME OF FLIGHT    : %s",p1[i](airplanename));
       printf("\nDATE OF FLIGHT    : %s",p1[i](airdate));
       printf("\nTIME OF FLIGHT    : %s",p1[i](airtime));
       printf("\nCLASS             : %s",p1[i](flclass));
       printf("\nGATE              : %s",p1[i](airgate));
       printf("\nSEAT              : %s",p1[i](airseat));
       printf("\nFROM              : %s",p1[i](flyfrom));
       printf("\nTO                : %s",p1[i](flyto));
       printf("\n********************************************");
    }
}

int main()
{

    passenger p[100],*pptr;
    
    pptr=&p[0];
    input_output(pptr);
    
    return 0;
}

 

My pure C is a bit rusty.

Spoiler

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

#define MAGIC_NUMBER 10
#define LINE(a) for(int i = 0; i < 30; i++) putchar(a); putchar('\n')

typedef struct {
    char x[200];
}prompt_x;

typedef struct {
    prompt_x p[MAGIC_NUMBER];
} passenger;

const char *_prompts[MAGIC_NUMBER] =
{
    "Enter ticket number     : ",
    "Enter name of passenger : ",
    "Enter name of flight    : ",
    "Enter date of flight    : ",
    "Enter time of flight    : ",
    "Enter class             : ",
    "Enter gate              : ",
    "Enter seat              : ",
    "Enter from              : ",
    "Enter to                : "
};

const char *_display[MAGIC_NUMBER] = {
    "TICKET NUMBER     : ",
    "NAME OF PASSENGER : ",
    "NAME OF FLIGHT    : ",
    "DATE OF FLIGHT    : ",
    "TIME OF FLIGHT    : ",
    "CLASS             : ",
    "GATE              : ",
    "SEAT              : ",
    "FROM              : ",
    "TO                : "
};

const char _other[] = "ENTRY FOR PASSENGER";
const char _other_b[] ="TICKET DETAILS OF PASSENGER";
const char _another_other[] = "cont? [y/n]: ";

int main() {
    bool running = true;
    int index = 0;
    char temp[2];
    passenger *me;
    me = (passenger*) malloc(0);

    while(running == true) {
        printf("%s [ %d ]\n", _other, index+1);
        me = realloc(me, (index+1) * sizeof(passenger));
        for(int i = 0; i < MAGIC_NUMBER; i++) {
            printf("%s", _prompts[i]);
            scanf("%199s", me[index].p[i].x);
        }LINE('*');

        index++;

        LINE('-');
        printf("%s", _another_other);
        scanf("%1s", temp);
        LINE('-');
        if((temp[0] == 'n') || (temp[0] == 'N'))
            running = false;
    }

    for(int u = 0; u < index; u++) {
        printf("%s [ %d ]\n", _other_b, u+1);
        for(int i = 0; i < MAGIC_NUMBER; i++) {
            printf("%s%s\n", _display[i], me[u].p[i].x);
        }LINE('*');
    }
    
    free(me);
    return 0;
}

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×