codeblocks

How Do I Set the Working directory on Code::Blocks on Mac?

柔情痞子 提交于 2021-01-04 07:22:23
问题 I am learning C programming so I'm a total beginner. I am using Code::Blocks 12.11 on Mac, I have got Xcode and downloaded the command line packages so everything seems to be doing what I want it to. My problem is when I open a .txt file it doesn't appear in the directory with the source code and other files, I have found it in the All My File folder in Finder. I am creating projects using the following steps > File > New > Project > Console Application > Then naming the Project and saving it

How Do I Set the Working directory on Code::Blocks on Mac?

半城伤御伤魂 提交于 2021-01-04 07:21:33
问题 I am learning C programming so I'm a total beginner. I am using Code::Blocks 12.11 on Mac, I have got Xcode and downloaded the command line packages so everything seems to be doing what I want it to. My problem is when I open a .txt file it doesn't appear in the directory with the source code and other files, I have found it in the All My File folder in Finder. I am creating projects using the following steps > File > New > Project > Console Application > Then naming the Project and saving it

C++ CodeBlocks upgrade to C++17 can't use std::filesystem

生来就可爱ヽ(ⅴ<●) 提交于 2020-12-08 03:05:12
问题 I need to be able to list the files in a directory, and so I'm trying to upgrade my C++ version in CodeBlocks to C++ 17 so i can use filesystem. To do this I followed the steps outlined at http://candcplusplus.com/enable-c17-in-code-blocks-mingw-gcc-for-all-version-with-pictures#:~:text=Enabling%20the%20C%2B%2B17,Create%20a%20project. I didnt have to change much, CodeBlocks 20.03 and MinGW 8.1.0 are already installed. MinGW is already in my path from when I built wxWidgets. The Settings-

a c++ program returns different results in two IDE

冷暖自知 提交于 2020-12-04 17:19:30
问题 I write the following c++ program in CodeBlocks , and the result was 9183. again I write it in Eclipse and after run, it returned 9220. Both use MinGW . The correct result is 9183. What's wrong with this code? Thanks. source code: #include <iostream> #include <set> #include <cmath> int main() { using namespace std; set<double> set_1; for(int a = 2; a <= 100; a++) { for(int b = 2; b <= 100; b++) { set_1.insert(pow(double(a), b)); } } cout << set_1.size(); return 0; } 回答1: You are probably

a c++ program returns different results in two IDE

◇◆丶佛笑我妖孽 提交于 2020-12-04 17:16:07
问题 I write the following c++ program in CodeBlocks , and the result was 9183. again I write it in Eclipse and after run, it returned 9220. Both use MinGW . The correct result is 9183. What's wrong with this code? Thanks. source code: #include <iostream> #include <set> #include <cmath> int main() { using namespace std; set<double> set_1; for(int a = 2; a <= 100; a++) { for(int b = 2; b <= 100; b++) { set_1.insert(pow(double(a), b)); } } cout << set_1.size(); return 0; } 回答1: You are probably

Beginning Code::blocks and UnitTest++

久未见 提交于 2020-11-28 04:58:06
问题 I'm about to start a C++ project but I'm stuck at the basics. I want to use the (linux) Code::Blocks IDE, and it's easy to create a normal project. However I want to do TDD using the UnitTest++ framework, and I don't know how to set everything up cleanly. I've already asked a question about where to put the UnitTest::RunAllTests() command, and they told me the best place is the main() of a separate program. How do I go about doing this in Code::Blocks? I think I need to create 2 projects: The