GithubHelp home page GithubHelp logo

cpp-primer-5th-edition's People

Contributors

tekaoh avatar veinin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cpp-primer-5th-edition's Issues

关于7_32.h编译不通过的问题。

你好,我测试你代码的时候,有一个头文件7_32.h一直编译不通过,我换了两个编译器都不行,下面是一些错误信息,请你看一下有没有解决方案?谢谢。

我的操作系统是:
版本 Windows 10 专业工作站版
版本号 22H2
安装日期 ‎2023/‎2/‎20
操作系统内部版本 19045.2604
体验 Windows Feature Experience Pack 120.2212.4190.0
64位

----在vs 2022中报以下错误:
`Build started...
1>------ Build started: Project: Project2, Configuration: Debug x64 ------

1>main.cpp
1>C:\Users\Administrator\source\repos\primer5\chapter7\Project2\Project2\7_32.h(15,40): error C2027: use of undefined type 'Screen'
1>C:\Users\Administrator\source\repos\primer5\chapter7\Project2\Project2\7_32.h(7,7): message : see declaration of 'Screen'
1>C:\Users\Administrator\source\repos\primer5\chapter7\Project2\Project2\7_32.h(21,6): error C2027: use of undefined type 'Screen'
1>C:\Users\Administrator\source\repos\primer5\chapter7\Project2\Project2\7_32.h(7,7): message : see declaration of 'Screen'
1>C:\Users\Administrator\source\repos\primer5\chapter7\Project2\Project2\7_32.h(21,31): error C2027: use of undefined type 'Screen'
1>C:\Users\Administrator\source\repos\primer5\chapter7\Project2\Project2\7_32.h(7,7): message : see declaration of 'Screen'
1>C:\Users\Administrator\source\repos\primer5\chapter7\Project2\Project2\7_32.h(21,42): error C2027: use of undefined type 'Screen'
1>C:\Users\Administrator\source\repos\primer5\chapter7\Project2\Project2\7_32.h(7,7): message : see declaration of 'Screen'
1>C:\Users\Administrator\source\repos\primer5\chapter7\Project2\Project2\7_32.h(21,29): error C2440: '': cannot convert from 'char' to 'std::string'
1>C:\Users\Administrator\source\repos\primer5\chapter7\Project2\Project2\7_32.h(21,29): message : No constructor could take the source type, or constructor overload resolution was ambiguous
1>Done building project "Project2.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Build started at 10:50 AM and took 01.120 seconds ==========`

-----在Clion中报以下错误:
注:Clion使用的标准是C11,项目名是untitled2,编译器配置如下:
图片
`====================[ Build | untitled2 | Debug ]===============================

"C:\Program Files\JetBrains\CLion 2022.3.3\bin\cmake\win\x64\bin\cmake.exe" --build C:\Users\Administrator\CLionProjects\untitled2\cmake-build-debug --target untitled2 -j 12
[1/2] Building CXX object CMakeFiles/untitled2.dir/main.cpp.obj
FAILED: CMakeFiles/untitled2.dir/main.cpp.obj
C:\PROGRA1\JETBRA1\CLION2~1.3\bin\mingw\bin\G__~1.EXE -g -fdiagnostics-color=always -std=gnu++11 -MD -MT CMakeFiles/untitled2.dir/main.cpp.obj -MF CMakeFiles\untitled2.dir\main.cpp.obj.d -o CMakeFiles/untitled2.dir/main.cpp.obj -c C:/Users/Administrator/CLionProjects/untitled2/main.cpp
In file included from C:/Users/Administrator/CLionProjects/untitled2/main.cpp:2:
C:/Users/Administrator/CLionProjects/untitled2/7_32.h:15:51: error: invalid use of incomplete type 'class Screen'
15 | std::vector screens{Screen(24, 80, ' ')};
| ^
C:/Users/Administrator/CLionProjects/untitled2/7_32.h:7:7: note: forward declaration of 'class Screen'
7 | class Screen;
| ^~~~~~
C:/Users/Administrator/CLionProjects/untitled2/7_32.h:15:52: error: could not convert '{}' from '' to 'std::vector'
15 | std::vector screens{Screen(24, 80, ' ')};
| ^
| |
|
C:/Users/Administrator/CLionProjects/untitled2/7_32.h: In member function 'void Window_mng::clear(Window_mng::ScreenIndex)':
C:/Users/Administrator/CLionProjects/untitled2/7_32.h:21:5: error: invalid use of incomplete type 'class Screen'
21 | s.contents = std::string(s.height * s.width, ' ');
| ^
C:/Users/Administrator/CLionProjects/untitled2/7_32.h:7:7: note: forward declaration of 'class Screen'
7 | class Screen;
| ^~~~~~
C:/Users/Administrator/CLionProjects/untitled2/7_32.h:21:30: error: invalid use of incomplete type 'class Screen'
21 | s.contents = std::string(s.height * s.width, ' ');
| ^
C:/Users/Administrator/CLionProjects/untitled2/7_32.h:7:7: note: forward declaration of 'class Screen'
7 | class Screen;
| ^~~~~~
C:/Users/Administrator/CLionProjects/untitled2/7_32.h:21:41: error: invalid use of incomplete type 'class Screen'
21 | s.contents = std::string(s.height * s.width, ' ');
| ^
C:/Users/Administrator/CLionProjects/untitled2/7_32.h:7:7: note: forward declaration of 'class Screen'
7 | class Screen;
| ^~~~~~
ninja: build stopped: subcommand failed.
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.