Click here to Skip to main content
15,742,180 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hy It says that sg klasa [NUM_STUDENTS]; is error C2148: total size of array must not exceed 0x7fffffff bytes

#include <stdafx.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define STR_LEN 20
#define NUM_STUDENTS 2
int main (void) {
    char first_name[STR_LEN];
    char LAST_NAME[STR_LEN];
    float grade;
    typedef struct student_grade sg;
    sg klasa [NUM_STUDENTS];
//error occurs
    return 0;

Follow this link[^] and you will see a sample on how to do that...

It is really simple, you will see.

Hope this helps.
Share this answer
Albert Holguin 13-Jul-11 12:05pm    
my 5, his structure is defined incorrectly.
Joan M 13-Jul-11 12:14pm    
Thank you Albert!
typedef struct student_grade sg;

You do not have a declaration for the student_grade structure.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900