我不斷收到一個例外,當我試圖編譯在Unix服務器上我的C++代碼,但這些線路只是有:有關如何解決此錯誤的任何想法?
#ifndef WEIGHTED_GRAPH_H
#endif
和錯誤是:
In file included from Weighted_graph_tester.h:17,
from Weighted_graph_driver.cpp:18:
Weighted_graph.h:1: error: stray â\357â in program
Weighted_graph.h:1: error: stray â\273â in program
Weighted_graph.h:1: error: stray â\277â in program
Weighted_graph.h:1: error: stray â#â in program
In file included from Weighted_graph_tester.h:17,
from Weighted_graph_driver.cpp:18:
Weighted_graph.h:172:2: error: #endif without #if
Weighted_graph.h:1: error: âifndefâ does not name a type
什麼想法?
您的源代碼中可能有一些奇怪的字符。嘗試查看它在一個十六進制查看器... – 2013-04-07 19:44:14