views:

56

answers:

2

I've editted a struct, added some members, removed others. But when I'm debugging, it doesn't show the new members, but is still showing some old members. It's very annoying. This is the struct. It doesn't show the firstFreeSpot int. But a vector called appointments, which I removed. This is the struct.

struct AppointmentHour
{
 string date;
 string beginTime;
 string endTime;
 string class;

 int firstFreeSpot;

 string toString();
 static AppointmentHour* fromString(string str);
 int getOccupation();
 bool isSpaceFree(int duration);
 int getFirstFreeSpot();
 void addAppointmentDuration(int duration);
};

I'm certain this is the right struct, because when i go to the definition, it leads to this struct. And when i remove a field of this struct, it sayt it can't find it.

Has anybody a clue whats going on here?

+2  A: 

Maybe try Rebuild solution?

Ropstah
That was the sollution, thx.
Ikke
A: 

I'm guessting that the class library that declares this struct is not the same as the startup project, correct? Somehow your startup project is ending up with an older version of the assembly.

This could happen any number of ways. Compile errors could prevent it from compiling the other library, though this circumstance would give you a warning dialog. You could also have added the reference to this project as a direct DLL reference through the "Browse" tab in the Add Reference dialog rather than adding it as an explicit project reference. This could cause the same issue.

Provide us with some more information on your environment (solution setup, references, etc.) and we can help more.

Adam Robinson
The environment is quite simple. Just a few classes and struct interacting with each other. No references or something.
Ikke