免费试用:最火的人工智能查询工具
     最强AI人工智能聊天工具
     对话机器人解答疑难问题
星外智问直连原始API接口(GPT-4o)
➡️未登录受限条数,请登陆使用完整服务>>>➡️
请输入您要问的问题:


查下百度  查下必应

以下是单个问题的回复:

问:/sky/code/argo_gst_oatpp_zh/main.cpp: In function ‘int main()’: /sky/code/argo_gst_oatpp_zh/main.cpp:108:27: error: invalid use of non-static data member ‘grabImage::transtream’ 108 | if(grabImage::transtream = false){ | ^~~~~~~~~~ In file included from /sky/code/argo_gst_oatpp_zh/main.cpp:5: /sky/code/argo_gst_oatpp_zh/./include/grabImage.h:23:10: note: declared here 23 | bool transtream = false; // 切流信号 | ^~~~~~~~~~ make[2]:
GPT答: 7i24.cn
The error message is indicating that you are trying to access a non-static data member `transtream` from the class `grabImage` in a static context. 

To fix this error, you have two options:

1. Make the `transtream` member variable static:
   - In your `grabImage.h` file, change the declaration of `transtream` to: 
     ```cpp
     static bool transtream;
     ```
   - In your `grabImage.cpp` file, add the definition of `transtream`, outside of any function:
     ```cpp
     bool grabImage::transtream = false;
     ```

2. Create an instance of the class and access its member variable through that instance:
   - In your main function, create an instance of the `grabImage` class:
     ```cpp
     grabImage image;
     ```
   - Change your if statement to use the instance's member variable instead:
      ```cpp
      if (image.transtream == false) {
      ```

Choose one option based on how you intend to use the `transtream` variable in your program.
一星  二星  三星  四星  五星 

互联网非法外之地,请不要输入不良内容
 查下百度 查下必应 06-20 15:05:38



chatGPT中国版--星外智问--8v6.CN
当前运行网址:haoadm.com
客服微信:xwgdd_com APP下载 怎么问 识别真假GPT4 使用GPT赚钱 退出登陆