+1 Ossama Memon · December 28, 2015
Guys whenever I run my code of structures I always get this freaking thing. 
I copied the code of bucky.

Post a Reply


Oldest  Newest  Rating
0 Laura Lee · December 28, 2015
Show the code so we can actually see what's wrong.
0 chinesh doshi · December 28, 2015
may be that header file which you are including in your program may not be present in your library.
0 Linguist Llama · December 29, 2015
Please stop guessing, chinesh.
0 Ossama Memon · December 29, 2015
Chinesh look i've introduced #include "structuresinfo.h" above. This is my code.

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

The main code

int main()
    struct user ossama;
    struct user ali;
    ossama.userID = 1;
    ali.userID = 2;
    puts("Enter the first Name of user 1");
    puts("Enter the first Name of user 2");
    printf("User 1 ID is %d \n", ossama.userID);
    printf("User 2 first name is %s \n", ali.firstName);

Another page's code and the name of this page is structuresinfo.h

struct user{
    int userID;
    char firstName;
    char lastName;
    int age;
    float weight;
0 chinesh doshi · December 29, 2015
then what is the problem ?
0 Linguist Llama · December 30, 2015
It's worth noting that your compiler is probably warning you about this problem... You should pay more attention to warnings.
0 Ossama Memon · December 30, 2015
Krootushas Gesu Your idea worked. I made 2 char arrays and now it's working. Thank you and thanks to all of you who replied me.
  • 1



One of the most popular languages of all time.

Bucky Roberts Administrator