本文介绍了这里发生了什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我已经编程了一段时间,我在 之前看过这个语法,我从一本书中复制了这个,但这本书并没有解释会发生什么。 在这里。 级引擎{ 受保护: 静态引擎* pengine; 比以后: if(initialize(hin)){ if(!engine :: gengine() - > init(CmdShow )){return false;} while(TRUE){ 引擎对象有自己的类型作为指针然后它被称为 由上面的命令。我相信这是OO编程,但我不会理解发生了什么以及我会写什么小程序或 项目tha = t会帮助我学习这个。 解决方案 多么不幸名字,读起来像企鹅! 这将是语法错误,你有宣称pengine作为一个指针 ,在这里你试图调用它上面的operation()。 为什么将伪布尔与bool混合使用? 具体你不明白什么?我不认为你的问题是与bO编程有关,更多的是不理解的情况 一些C ++基础知识。您正在学习哪本书? - Ian Collins。 这是一个语法错误,你声明了pengine作为指针 ,在这里你试图调用它上面的operation()。 我根本没看到它在哪里用过pengine。我看到的唯一使用operator() 的是genngine()返回 - 而且他还没有向我们展示 。 - 后来, 杰瑞。 宇宙是它的一个虚构自己的想象力。 这将是一个语法错误,您已声明pengine作为指针在这里你试图调用它上面的operation()。 我根本没看到它在哪里用过pengine。我看到的唯一使用operator() 的是genngine()返回 - 而且他还没有向我们展示 。 糟糕,看到它是一个无用的名字! - Ian Collins。 I have been programming for a while and I have seen this syntax beforeand I copied this from a book but the book didn''t explain what is goingon here.class engine{protected:static engine* pengine;Than later:if(initialize(hin)){if(!engine::gengine()->init(CmdShow)){return false;}while(TRUE){The engine object has its own kind as a pointer then later it is calledby the above command. I do believe this is OO programming but I don''tunderstand what is going on and what small programs I would write orprojects tha=t would help me learn this. 解决方案What an unfortunate name, reads like penguin!This would be a syntax error, you have declared "pengine" as a pointerand here you are attempting to invoke operation () on it.Why mix pseudo booleans with bool?What specifically don''t you understand? I don''t think your problem isanything to do with OO programming, more an case of not understandingsome C++ basics. Which book are you learning from?--Ian Collins.This would be a syntax error, you have declared "pengine" as a pointerand here you are attempting to invoke operation () on it.I don''t see where it''s used pengine at all. The only use of operator()that I see is on whatever genengine() returns -- and he hasn''t shown usthat at all.--Later,Jerry.The universe is a figment of its own imagination.This would be a syntax error, you have declared "pengine" as a pointerand here you are attempting to invoke operation () on it.I don''t see where it''s used pengine at all. The only use of operator()that I see is on whatever genengine() returns -- and he hasn''t shown usthat at all.Oops, see it was an unhelpful name!--Ian Collins. 这篇关于这里发生了什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 阿里云证书,YYDS!
05-23 18:19