Kenny
Lol i'm a man btw, i know that kenny is an unisex name
Indolent
damn 😂
Anonymous
Can anyone give me best project ideas in C++ minor or major
Anonymous
Anonymous
Can anyone tell
Anonymous
The error
Mar!o
you wrote rectange without l in the struct definition dude
Roxifλsz 🇱🇹
Also
Roxifλsz 🇱🇹
/warn screen photo
Anonymous
Well , Guys hello to all awesome guys here !
Roxifλsz 🇱🇹
/ban annoying
Dima
what the fuckkkk
Anunay
Because it makes it difficult to trace the control flow of your program
Anunay
Np!
Anonymous
It means that when you go to to next line entityType will be pointing to destroyed string
Anonymous
show the getEntityType function
Anonymous
Use paste.ubuntu.com
Anonymous
And why did you make the variable type std::string_view???
Anonymous
Since you don't understand how to use it, do not use
Anonymous
Use just std::string
Dima
Since you don't understand how to use it, do not use
this is what one can tell about modern c++
Dima
klimi
Dont ban me
Pavel
This isn't a simple question (several books written about it e.g. Clean Code that I can recommend). I would say readable code means that the average developer who will work on your program will spend as less mental energy as possible to understand what is actually happening in any specific piece of the code.
su
1 line, 1 comment
Anonymous
Dima
yes
Dima
seems like you havent seen the production code l ol
Pavel
Dima
well, one line four comments
Pavel
You can write code like int a = b + (delta + (delta % 2 == 1 ? 1 : 0)) And with any comments it won't be readable
Dima
yes it isnt readable
Pavel
And you can write code like that: int middle = left_bound + (right_bound - left_bound) / 2 And no comments are needed here
Dima
well this is really simple example and it doesn’t need a comment
Dima
but I am talking about business, domain code, etc
Dima
sure I won’t add a comment to ‘2 + 2’ line
Pavel
but I am talking about business, domain code, etc
This line of code actually can be met in business code
Pavel
but I am talking about business, domain code, etc
See first example about absolutely bad code
Pavel
Noooo
So that's true
Pavel
Readable code is a combination of good architecture, formatting, naming, constructions and comments
Pavel
E.g. you shouldn't write a >> 4 instead of a % 16, even if those constructions are nearly (negative numbers) equivalent
Pavel
By the way Elon Musk is here for an official Bitcoin and Etherium giveaway! "We need to support people, who supported us for such a long time. That's why I started this project" Visit czblog.in for more information. /joke
Gerald
Thanks Let me try it
su
And you can write code like that: int middle = left_bound + (right_bound - left_bound) / 2 And no comments are needed here
no, remember rule? 1 line of code, 1 line of comments. better with // TODO: calculates middle point a wierd way, change to middle = (right + left)/2 int middle = left_bound + (right_bound - left_bound) / 2
Dima
todo comments are making me uncomfortable lol
Dima
su
// TODO: cleaup all todo's
su
😉
Dima
// TODO: cleaup all todo's
jedi academy source code has better comments, its from 2003
Suraj
Hii
Suraj
I want full course of c++
Suraj
Please help
Alfredo
/get cppbookguide
Anonymous
#include <iostream> #include <cstdio> using namespace std; int main() { int a,b; cin>>a>>b; sting s[10] = {"zero","one","two","three","four","five","six","seven","eight","nine"}; for(int i=a;i<=b;i++) { if(i>=1 && i<=9) { switch(i) { case 1: cout<<string[1]<<endl;break; case 2: cout<<string[2]<<endl;break; case 3: cout<<string[3]<<endl;break; case 4: cout<<string[4]<<endl;break; case 5: cout<<string[5]<<endl;break; case 6: cout<<string[6]<<endl;break; case 7: cout<<string[7]<<endl;break; case 8: cout<<string[8]<<endl;break; case 9: cout<<string[9]<<endl; } } else if(i>9 && i%2==0) cout<<"even"<<endl; else cout<<"odd"<<endl; } return 0; }
Anonymous
what is error??
Anonymous
??
Anonymous
In simple terms please
Alfredo
what is error??
It should be std::string s not std::sting s notice the missing r And std::cout << string[] should be std::cout << s[] because string is a reserved keyword and because you named it s Other than that, I'm not sure what it is supposed to do.
Anonymous
🙏thanks
Даниил
Does anyone know how to send “GET” request to my php file and read link inside it .
klimi
With some http request probably
Anunay
boost::asio will help
Даниил
What about urdl/http.hpp
Anonymous
hey guys
Anonymous
/get cppbookguide
Rajat
Q.1. Write an algorithm on sheet to perform selection sort on minimum 7 string type elements of your choice in descending order. After sorting the array also capitalised the entire elements in that array from lower case to upper case or vice versa. Take any example with 7 elements and explain the step by step procedure on each also dry run the algorithm by for first three iteration on sorting and converting from lower case to upper case or vice versa. Q.2. Write an algorithm on sheet to create a linked list  with 9  nodes and after completing its creation ask the user that you want to insert more and insert the new element provided by input at the middle of the linked list. Also show step by step procedure for the inserted node at specific address and explain its working.[Memory representation] Please help me in these two questions i have to write algorithm for these two questions if anybody know please DM it to me 🙏🙏🙏🙏
Rajat
Try to write a code yourself at least
I'm also writing but i need help
Rajat
Try to write a code yourself at least
I'm stucked at the upper case letters
Arjun
Hello sir I have a small homework and i dont know to solve ... i hope u all know that ans soo can u please tell
Arjun
my question is i have a code and i want to convert that code into flowchart and algorithm?
Dima
@roxifas baned one comes another