Rose
/get mcve
When asking a question about a problem caused by your code, you will get much better answers if you provide code people can use to reproduce the problem. That code should be… …Minimal – Use as little code as possible that still produces the same problem …Complete – Provide all parts needed to reproduce the problem in the question itself …Verifiable – Test the code you're about to provide to make sure it reproduces the problem Taken from https://stackoverflow.com/help/mcve
Nilesh
/get meta
Rose
/get meta
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is. These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot? If you have a question ask it directly. You are more likely to get a response that way.
Nilesh
/get ot
Rose
/get ot
Offtopic discussions should be done in the C/C++ Offtopic group. Please take your discussion/questions there.
Nilesh
/get paste
Rose
/get paste
To share code or error tracebacks, use an online pasting service like: - https://hastebin.com - https://pastebin.com - https://dpaste.org - https://wandbox.org - https://godbolt.org
Nilesh
/get projects
Rose
/get projects
Please check the Resources section for links on Open Source Projects in C/C++ some of which are explained from scratch.
Nilesh
/get res
Rose
/get res
Please check out this channel - @Resources for information on learning sources for C and C++ (books and videos) and Frequently Asked Questions.
Nilesh
#markdown
Rose
#markdown
If you are posting a single line of code, then embed the code within a single backtick i.e. ` The backtick should be there before the beginning of the line of code and at the end of the line of code. Ex: `cout << "Hello";` If you are posting multiple lines of code, embed the entire source code within three backticks (at the beginning and at the end) on a line of their own. Ex: #include<iostream> int main(){      return 0; } ``` <- Three backticks here
Baron
Group, I have a strange problem in my fleet. A code as simple as hello_world it not compiling and it is giving me 3 different errors in 3 different OS's.
Baron
The code: #include<iostream> using namespace std; int main(){ cout << "**********************************" << endl; cout << "* Wellcome to the guessing game! *" << endl; cout << "**********************************" << endl; } FreeBSD output: BattleStar-Lat54% cpp main.cpp -o bin && chmod u+x bin && ./bin ./bin: 38: Syntax error: "(" unexpected BattleStar-Lat54% cpp --version FreeBSD clang version 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15a9eac9) Target: x86_64-unknown-freebsd14.1 Thread model: posix InstalledDir: /usr/bin OpenBSD output: § cpp main.cpp -o bin && chmod u+x bin && ./bin # 1 "main.cpp" # 1 "<built-in>" 1 # 1 "<built-in>" 3 # 432 "<built-in>" 3 # 1 "<command line>" 1 # 1 "<built-in>" 2 # 1 "main.cpp" 2 main.cpp:1:9: fatal error: 'iostream' file not found #include<iostream> ^~~~~~~~~~ using namespace std; int main (){ cout << "********************************" << endl; cout << "* Wellcome to the gessing game *" << endl; cout << "********************************" << endl; } 1 error generated. § cpp --version OpenBSD clang version 16.0.6 Target: amd64-unknown-openbsd7.5 Thread model: posix InstalledDir: /usr/libexec Linux output: BattleStar-Void418% cpp main.cpp -o bin && chmod u+x bin && ./bin ./bin: 18: namespace: not found ./bin: 24: Syntax error: "(" unexpected (expecting "}") BattleStar-Void418% cpp --version cpp (GCC) 13.2.0 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Baron
The code: #include<iostream> using namespace std; int main(){ cout << "**********************************" << endl; cout << "* Wellcome to the guessing game! *" << endl; cout << "**********************************" << endl; } FreeBSD output: BattleStar-Lat54% cpp main.cpp -o bin && chmod u+x bin && ./bin ./bin: 38: Syntax error: "(" unexpected BattleStar-Lat54% cpp --version FreeBSD clang version 18.1.5 (https://github.com/llvm/llvm-project.git llvmorg-18.1.5-0-g617a15a9eac9) Target: x86_64-unknown-freebsd14.1 Thread model: posix InstalledDir: /usr/bin OpenBSD output: § cpp main.cpp -o bin && chmod u+x bin && ./bin # 1 "main.cpp" # 1 "<built-in>" 1 # 1 "<built-in>" 3 # 432 "<built-in>" 3 # 1 "<command line>" 1 # 1 "<built-in>" 2 # 1 "main.cpp" 2 main.cpp:1:9: fatal error: 'iostream' file not found #include<iostream> ^~~~~~~~~~ using namespace std; int main (){ cout << "********************************" << endl; cout << "* Wellcome to the gessing game *" << endl; cout << "********************************" << endl; } 1 error generated. § cpp --version OpenBSD clang version 16.0.6 Target: amd64-unknown-openbsd7.5 Thread model: posix InstalledDir: /usr/libexec Linux output: BattleStar-Void418% cpp main.cpp -o bin && chmod u+x bin && ./bin ./bin: 18: namespace: not found ./bin: 24: Syntax error: "(" unexpected (expecting "}") BattleStar-Void418% cpp --version cpp (GCC) 13.2.0 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
can someone kindly advice me on how to proceed? please
Armenak
Is there a specific reason why you are compiling with 'cpp' command and not with 'clang++'?
Armenak
The issue is that the 'cpp' command just preprocesses your source code (i.e. expanding macros). If you print your 'bin' file, it will contain preprocessed code
Zhaofeng
Hi there,
%Nikita
Zhaofeng
well... unable to paste code here
Zhaofeng
I was asking about some codes I wrote
Zhaofeng
Some smallest examples about template
Zhaofeng
I am going to write some templates like template<int> inline int ston(std::string& str)
Zhaofeng
But it does not compile when I call it with ston<int>
Zhaofeng
How should I write this template?
Moses
/start@MissRose_bot
Rose
/start@MissRose_bot
Heya :) PM me if you have any questions on how to use me!
Moses
Okay
Moses
How can I use you
Коля
How can I use you
Who are you talking to ?
Osé
Who are you talking to ?
I believe they’re talking to the bot
%Nikita
Who are you talking to ?
he is talking to bot i think
Elliot
he is talking to bot i think
Yes he was talking to miss rose bot
𝘔𝘳. 𝘉𝘢𝘯𝘢𝘳𝘢𝘴𝘪𝘺𝘢 🥀
How can I use you
Bro took bot seriously 💀
EmbRio
Is c still use in 2024
EmbRio
Or c++. What should i learn first as a beginner
EmbRio
Anyone can answer my question
eax
Or c++. What should i learn first as a beginner
both are used and learn modern c++
eax
or just learn both
Pavel
Or c++. What should i learn first as a beginner
In my opinion it is more productive to start with C++ (and learn C later if you need it). And as eax mentioned, start with modern C++ (don't take old books that teach obsolete techniques, read reviews of books before starting them)
Siri
/start@MissRose_bot
Rose
/start@MissRose_bot
Heya :) PM me if you have any questions on how to use me!
%Nikita
/start@MissRose_bot
Rose
/start@MissRose_bot
Heya :) PM me if you have any questions on how to use me!
Shiva
/start@MissRose_bot
Rose
/start@MissRose_bot
Heya :) PM me if you have any questions on how to use me!
Akshat
/start@MissRose_bot
Rose
/start@MissRose_bot
Heya :) PM me if you have any questions on how to use me!
Rose
Heya :) PM me if you have any questions on how to use me!
Alex
Heya :) PM me if you have any questions on how to use me!
I'm having problems with my compiler
Elliot
I'm having problems with my compiler
What kind of problem you are facing ??
elsahou
Hey guys Which software would you recommend for offline C++ documentation? e.g. I use an open-source software called Zeal
Hy guys you can also use HTTRACK Website to actually clone locally any C++ online documention locally
Ludovic 'Archivist'
Hy guys you can also use HTTRACK Website to actually clone locally any C++ online documention locally
You can just download a clone of cppreference from the website itself
Pavel
You can just download a clone of cppreference from the website itself
Oh nice, didn't know about this https://en.cppreference.com/w/Cppreference:Archives
Hocine
hi guys i do know only the basics of c i do have a degree but it was 7 years ago so now i'm here asking for some open source project that can help me improve my skills thanks to this wonderful community to make me think again about my ambition
Rose
Not enough arguments!
33
#get compiler c++
Brooklyn
G++?
Clang?
Pasupuleti
Hi
Pasupuleti
I want to prepare c programming please help me
Rose
I want to prepare c programming please help me
Don't ask meta questions. In other words, don't ask to ask. Questions like "Does anyone know XYZ?", "Has anyone used XYZ?" or "Can someone help me?" are all considered meta questions because they don't specify what your actual problem is. These questions give the impression that you want people to approach you and offer their help as if they don't have any other work to do. Now doesn't that expectation make you look like an idiot? If you have a question ask it directly. You are more likely to get a response that way.
Pasupuleti
Please give guidance
harmony5 🇺🇳 ⌤
Rose
Please give guidance
Please check out this channel - @Resources for information on learning sources for C and C++ (books and videos) and Frequently Asked Questions.
Pasupuleti
Please send that resources
Pasupuleti
I don't know
Pasupuleti
Hlo
Janey
Good afternoon dear friends
ℭ𝔦𝔠𝔦𝔡𝔞
Does anyone have some good projects to do to get started in c++?
harmony5 🇺🇳 ⌤
#projects
Rose
#projects
Please check the Resources section for links on Open Source Projects in C/C++ some of which are explained from scratch.
ℭ𝔦𝔠𝔦𝔡𝔞
İ am making a game and a game engine
That's pretty cool! :D