Ludovic 'Archivist'
Got it, thanks, probably I can static assert on this also
You can definitely do that (caveat for std::array<char, u> with u<8)
Ludovic 'Archivist'
and arrays of size 0 in general
Ludovic 'Archivist'
the sizeof the array may be aligned up to 8
Ludovic 'Archivist'
well, that is the case for bigger ones too if u%8>0
Ludovic 'Archivist'
and arrays of size 0 have a sizeof>0
Pavel
the sizeof the array may be aligned up to 8
Oh no, I forgot about memory alignment again :)
Pavel
Thanks
Ludovic 'Archivist'
Oh no, I forgot about memory alignment again :)
People often forget about civilized methods of torture
LeBouy
a C program that takes three command line arguments: a character and two integers. The character is to be printed. The first integer specifies the number of times that the character is to be printed on a line. The second integer specifies the number of lines to be printed. Check input values are > 0.
paper
Sorry to make you sad, but just the Unreal Engine community dwarfs the Rust community, the Rust community is just real loud
I didn't say I have to do anything with rust , I said that it is a big and a growing community of a language that has a competition with c++
Dag † Weg
/get cppbookguide
LeBouy
Anonymous
i tried to do it but I can't find the solution
break the problem into smaller part Start with how would you print just a letter like C From there get an input and write C input number of time And so on, by the end you are done
Anonymous
LeBouy
yeah the code
Anonymous
yeah the code
Okay dm with the assignment
Ибраги́м
GitHub - friendlyanon/cmake-init: The missing CMake project initializer https://github.com/friendlyanon/cmake-init
Pankaj
Can anyone guide me about some new project in c ++
labyrinth
https://github.com/ClickHouse/ClickHouse/blob/master/src/Processors/Port.h#L72 I dont get it, a pointer can be stored as a ull type, which overall represent an address to dereference, how could the least bits of it be used to store a bitmasked state?
MRT
its possible to scale image without load data in memory ? i have problem with scaled large image!
Anonymous
Which apps is best for learn C++ languages in mobile?🤔🤔🤔
Anonymous
Here one more
Anonymous
But if you want learn seriously so tha you can go with solo learn
J
How much do I need to know about c++ to be able to do advanced things, such as operating systems, professional software, game engines, programming languages, browsers, etc.
Starting with basics. Since C++ is a big ocean choose a speciality. If you want to make operating systems, learn about computer architecture. If you want to learn about game engines, then learn Graphics libraries like OpenGL(Old but great for beginners and cross platform) or Vulkan(New but a bit advanced. Recommended to learn it after OpenGL) or DirectX(Windows only) along with window managers like SDL or glfw and Input managers like SDL Input or anyother and audio handling with Audio API's. (SDL will cover Window manager, Audio and Input and to a certain extent, graphics in 2D engine)
Rachit
Hi, Can anyone help me in my code. I want to avoid single entry/exit principle
rann
Please answer code programs
Ludovic 'Archivist'
What of C for embedded systems?
Both C and C++ a suited for embedded systems, AVR CPUs for example ship with a (non standard compliant) version of C++
Ludovic 'Archivist'
(I hate that they basically made a non standard compliant version of GCC and omitted the most important *freestanding* headers)
Ludovic 'Archivist'
Please can you share me resources on learning c for embedded systems
While I do have courses on that, I can't just give them for free, I am a teacher and it kinda is my livelihood
Guys i learned python c++, BASICS of DSA, good coding practice, I done my btech in electrical Now planing doing mtech in cse, What should i do to get a trainee position in software development I need your suggestions
Chaser
Hello
Chaser
/start@MissRose_bot
Chaser
/start@MissRose_bot
MᏫᎻᎯᎷᎷᎬᎠ
Have Gcc still not implemented full C++20?
MᏫᎻᎯᎷᎷᎬᎠ
Not to mention the direction of the language still undesired and dark
MᏫᎻᎯᎷᎷᎬᎠ
Not yet
Did they say something about ABI breakage? They still wanna support ol' codes and bad past choices??
MᏫᎻᎯᎷᎷᎬᎠ
Sad I heard 23 is feature complete and still no pattern matching, reflections, contracts
MᏫᎻᎯᎷᎷᎬᎠ
And all those cool features Just a derivation of some big companies Influences
✞✟✞✟✞
That’s true, sadly
𝕷𝖔𝖗𝖊𝖓𝖟𝖔
Hi guys, so I was studying my Professor's notes, and, at some point, I found the type "DWORD", which should stand for "double word". Ok, but after I found another type: "DWORD WINAPI", and I don't know what to do with it. I don't even know if it's a real thing or simply a mistake by the Professor. Could you please explain me what it is? Thank you!
Anonymous
so I'm guessing you didn't even search it on the web
𝕷𝖔𝖗𝖊𝖓𝖟𝖔
I did. The problem is, I found nothing
Anonymous
nothing?
Anonymous
https://www.mtholyoke.edu/courses/dstrahma/cs322/lab3andproj.htm
𝕷𝖔𝖗𝖊𝖓𝖟𝖔
That's why I asked here. I found a site about windows, and I read some of it. I couldn't find the answer and since I needed an answer right away I asked here
𝕷𝖔𝖗𝖊𝖓𝖟𝖔
I was running out of time. Eventually I managed to find info on the Internet, but I needed to ask here too, because if someone had answered before I actually found it, it'd spared me a lot of time
Anonymous
I'm just saying. you said you don't even know if it's a mistake while it clearly cannot be
Anonymous
anyways good luck with your studying
𝕷𝖔𝖗𝖊𝖓𝖟𝖔
anyways good luck with your studying
Thx, operating systems is like a new world when programming in C
Anonymous
Hii
Kosa
#include <iostream> #include<string> using namespace std; class student { private: int id; string name; double marks[3]; public: void setid(int i) { id = i; } void setname(string n) { name = n; } void setmarks(student st []) { int sum; int ss; int i; for ( i = 0;i < 3;i++) { cin>> st[i].marks[0]; cin >> st[i].marks[1]; cin >> st[i].marks[2]; sum = st[i].marks[0]; sum = st[i].marks[1]; sum = st[i].marks[2]; } ss = sum; } int getid() { return id; } string getname() { return name; } double* getmarks() { return marks; } student(int ii, string nn, const double mm[3]) { id = ii; name = nn; int j; for ( j = 0; j < 3; j ++) { cin >> mm[j]; } marks[j] = mm[j]; } student() { cout << "stident marks" << endl; } double avg() { return ss / 3; } void print() { cout << "id = " << id << endl; cout << "name = " << name << endl; for (size_t i = 0; i <3; i++) { cout << "marks = "<<marks[i] << endl; } cout << "avg = " << ss << endl; } }; int main() { student s2; student s1[3]; for (size_t i = 0; i <3; i++) { } }
Kosa
Which error
Kosa
??
Kosa
with correction
Kosa
pls
SMS
pls
https://t.me/programminginc/283193 how to ask questions
Nana
Hello guys I want to write a random numbers program in such a way that there is no duplicates
Nana
Here is my codes
Nana
Here is my codes
#include <iostream> #include <ctime> #include <cstdlib> #include <vector> using namespace std; void intro(); int main() { vector<int>vect; intro(); int num; int size = 10; int max = 10; int min = 1; unsigned seed = time(0); srand(seed); for(int count = 0; count < size; count++) { num = (rand()%(max - min+1))+min; vect.push_back(num); } cout<<"Here are the numbers\n"; cout<<"Index\tRandom number\n"; cout<<"-----------------------------\n"; for(int count = 0; count < size; count++) { cout<<count + 1<<"\t\t"<<vect[count]<<endl; } } void intro() { cout<<"\t\tThis is a random numbers program\n"; cout<<"\t\t------------------------------------\n"; cout<<endl; }
LeBouy
a C program to read two matrices of whole numbers and add the two matrices. Prompt the user for the matrix size and check that it is in range 2≤ range ≤ 5.
Gilded
Help the University librarian to include the 'n' new books into the stock. Each book is provided with the details such as book_name, first_author_name, book_id (4 digit number), pages, book_type (2 characters) and book_category. The book_type maybe fx,ex,sx,jx for f-fiction, e-engineering, s-science and j-journal or combination of two diferent types(for ex., fe for the books fall under both the f-fiction, e-engineering type) . The book_category is an unique identity given to each book with the following formate, - The first four letters are the book id. - The next four letters are the first two characters of the the two different book_type of the book, if applicable. A book may fall under maximum of two different book_types. In case a book fall under only one type then the 7th and 8th characters should be 'X' - The last two character are the first two character of the book_name. (Ex: 1001fienma for the book "maths for engineers") - Use a function to assign the book_category of each books. - Use another function to list the books (the book id, book_type and book_category) that fall under specific categories (maybe any of the 4 types and any combination of 2 book_types) by getting the book_category. can anyone help need a c code for this question?
klimi
```
Anyone imgui dev here?