--------------------Configuration: Maman12 - Win32 Debug--------------------
Linking...
main.obj : error LNK2005: _main already defined in disk.obj
main.obj : error LNK2005: _freespace already defined in disk.obj
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/Maman12.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Maman12.exe - 4 error(s), 0 warning(s)
WTH is that supposed to mean?
I have 3 files.
main.c
disk.c
disk.h
main.c
--------
#include [stdio.h] [ and ] are actually < and >
#include "disk.h"
void main(void)
{
}
disk.c
-------
#include [stdio.h] [ and ] are actually < and >
#include "disk.h"
void main(void)
{}
disk.h
-------
#define NAMELIMIT 10
typedef struct /* one memory cell */
{
char ch;
int track;
int position;
struct cell *next;
} cell;
typedef struct /* one cell in the "files" table */
{
char name[NAMELIMIT];
char info;
cell *file_start;
} file;
typedef struct /* the disk itself */
{
cell *tracks[6];
file *files;
} disk;
int freespace[3]={252,252,252}; /* indicates how much free space there is left on every */
/* disk. Disks are empty at first, so it is initialized */
/* to 4+8+16+32+64+128=252 */
I hate this course.
An advanced C course... And the first thing we need to do is a project, but we arent even familiar with the language yet. :crook:
(this is only the skeleton of the project of course)
Linking...
main.obj : error LNK2005: _main already defined in disk.obj
main.obj : error LNK2005: _freespace already defined in disk.obj
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/Maman12.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Maman12.exe - 4 error(s), 0 warning(s)
WTH is that supposed to mean?
I have 3 files.
main.c
disk.c
disk.h
main.c
--------
#include [stdio.h] [ and ] are actually < and >
#include "disk.h"
void main(void)
{
}
disk.c
-------
#include [stdio.h] [ and ] are actually < and >
#include "disk.h"
void main(void)
{}
disk.h
-------
#define NAMELIMIT 10
typedef struct /* one memory cell */
{
char ch;
int track;
int position;
struct cell *next;
} cell;
typedef struct /* one cell in the "files" table */
{
char name[NAMELIMIT];
char info;
cell *file_start;
} file;
typedef struct /* the disk itself */
{
cell *tracks[6];
file *files;
} disk;
int freespace[3]={252,252,252}; /* indicates how much free space there is left on every */
/* disk. Disks are empty at first, so it is initialized */
/* to 4+8+16+32+64+128=252 */
I hate this course.
An advanced C course... And the first thing we need to do is a project, but we arent even familiar with the language yet. :crook:
(this is only the skeleton of the project of course)