• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Using Structs with Queues

TheJokerV

Weaksauce
Joined
Mar 23, 2007
Messages
81
So I'm trying to write a program which uses queues of structs and I have the following code snippet for example:

Code:
#include <queue>

struct packet {
    int transfer_id;
    
    int begin_loc[2];
    int end_loc[2];
    
    int num_cc_bus_wait;
    int num_cc_router_wait;
    int num_cc_router_int_wait;
    
    int temp1;
};

int G_CLK = 0;
queue<packet> outputs;

but for some reason I get an error saying:

Code:
error C2143: syntax error : missing ';' before '<'

This happens for all the struct queues I use. Am I doing something inherently worng or is there some small rule I'm unaware of?

Thanks
-Joker
 
Yeah, you usually get that error message if the template isn't defined. Either do what Tawnos said, or add the standard "using namespace std;" at the top.
 
Back
Top