Nov 13, 2013 at 7:24am UTC
Code and error are given below:
1 2 3 4 5 6 7 8
int sc_main(int argc, char * argv[])
{
tb_top t_top("tb_top" );
sc_start(1000,SC_NS); //start simulation
sc_stop(); //stop simulation
return (0);
}
error: expected ‘}’ at end of input
error: expected unqualified-id at end of input
Regards
cam
Last edited on Nov 13, 2013 at 7:25am UTC
Nov 13, 2013 at 8:29am UTC
The code you posted seems correct.
On which line do the errors appear?
Nov 13, 2013 at 8:47am UTC
error is shown on 8th line
Nov 13, 2013 at 9:17am UTC
Again, I do not see anything wrong with your code, syntactically.
You should post more code.
Nov 13, 2013 at 10:14pm UTC
If you made this as a windows application, make sure that you have the #include "stdafx.h"
header above all other headers, this can cause funny behavior sometimes
Nov 14, 2013 at 2:24am UTC
The MS stuff won't make a difference.
There are several possibilities.
(1) You have too many {'s somewhere.
(2) You forgot a semicolon after (a) a struct declaration or (b) a variable declaration.
(3) What helios said.
Good luck.
Nov 14, 2013 at 5:41am UTC
thanks helios and Duoas,
Its solved, it was } missing in other file that i had included in tb_top and to which i am running in sc_main.