0_0_28113456_26793.cpp:19:1: error: expected unqualified-id before '{' token { ^ 0_0_28113456_26793.cpp: In function 'int main()': 0_0_28113456_26793.cpp:82:25: error: 'add' was not declared in this scope add(u,v,cost); ^