在头文件中定义一个静态函数。
class Diagnostics {
public:
static void functionA(){
}
static void functionB(){
some code //works fine until enters the loop below
variable_name // works fine here.
if (condition){ //
variable_name; // after condition is met , i step in here, debugger cannot examine
// the vairable_name which was fine above. right after i try to step over , i get SIGSEV error
some_code; // doesnt even come here. Process exited with SIGSEV
function C(); // tried using classname::functionC , didnt work either
}
}
static void functionC(){
}
variable_name
- 它没有被提及。而且如果它没有被找到,这个过程怎么可能以 SIGSEGV 退出呢?如果没有找到variable_name
,它就不会编译通过。 - Steve Jessopvariable_name
是什么?some_code
是什么?它们在哪里定义?此外,您的函数缺少返回类型。 - casablancavariable_name
... - Mike DeSimone