GOPA
C++ supports six different grammar for regular expressions. By default, the ECMAScript grammar is used. This one is the most powerful grammar of the six grammars and is quite similar to the grammar used in Perl 5. The other five grammars are the basic, extended, awk, grep, and egrep grammars.
Asdf
#include <regex> ... std::string regExpr("C\\+\\+"); std::string regExprRaw(R"(C\+\+)") this is how reex looks
r-char-sequence - A sequence of one or more r-chars, except that it must not contain the closing sequence )d-char-sequence" r-char - A character from the source character set (until C++23)translation character set (since C++23)
Azadi
Write your notes about the following topics: Spaceship operator alignas
Azadi
Just to see what you’ve written for them!
Garry
how do i debug in vs code(CODELLDB) for c++
Garry
Suka
it just simply runs the code
put break point first.
Garry
put break point first.
i did do i have to do smth about that catch throw thing
Suka
i did do i have to do smth about that catch throw thing
check this first. https://github.com/vadimcn/codelldb/blob/v1.9.2/MANUAL.md#launching-a-new-process if you want auto break at exception then you will need to set those up.
Garry
i searched it on yt , but didn't work
You
Why , 1 byte is 8 bit ..y not 9 bit, y not 10 bit?
Anonymous
Why , 1 byte is 8 bit ..y not 9 bit, y not 10 bit?
https://www.quora.com/What-is-a-bit-Why-are-8-bits-considered-as-1-byte-Why-not-7-bit-or-9-bit?ch=10&oid=29219962&share=079dc2e4&srid=hPedyK&target_type=question
klimi
Why , 1 byte is 8 bit ..y not 9 bit, y not 10 bit?
https://en.wikipedia.org/wiki/Byte
klimi
https://en.wikipedia.org/wiki/Byte
https://softwareengineering.stackexchange.com/questions/120126/what-is-the-history-of-why-bytes-are-eight-bits
Anonymous
1 byte in C++ is ≥ 8 bit
He must also ask why a nibble has 4 bits 🥲
Anonymous
Idk what a nibble is
🥲 nibble is half of a byte
Danya🔥
I've never heard this term I think it's not quite used
𝔖𝔞𝔯𝔬
I don’t say bit, i talk in Boolean😎
𝔖𝔞𝔯𝔬
(Whic in C is like a byte instead of a bit…)
Jose
Why , 1 byte is 8 bit ..y not 9 bit, y not 10 bit?
Excellent computer archeology question 👏
Jose
I've never heard this term I think it's not quite used
In 8-bit microcontrollers was widely used when the protocols are more swallow in terms of transmission speeds (80s, I'm calling you!). For example, an ethernet transmission consists of a nibble to adjust the transmission speed between node and router (4 bits in 1-0-1-0 sequence to stablish the clock of the transmission)
Danya🔥
In ML they just say "4 bit"
Jose
So it's just not used in my field
And probably nowadays are moved to narrow fields. The kind of knowledge an ancient professor of an odd university would like to teach you which worth today is almost zero
Jose
In ML they just say "4 bit"
In ML-on-the-edge is still used when parameters are quantized, as float16 (for example) is called "half float" but in wider fields is not used or known by other engineers
Danya🔥
Not what it represents
Danya🔥
And half float is 16 bit And there's 4 bit quantization that sometimes used
Jose
I'm talking only about the word itself
Yes, the word "nibble" are used by FPGA designers and BSP-related device drivers, but is uncommon, sure
Danya🔥
But I've never heard "nibble" or any other special word for 4 bits
Jose
The half-float is another example, not the main topic, only another example of "wording" about terminology not widely used today 😁
Jose
I think it's widely used among those people who use half floats
Exactly, the same for people with electronic engineering backgrounds and archaic professors 😂
Anonymous
Can anyone pls explain me what's the char**ptr See char *ptr means we are declaring a char pointer but what's char**ptr
Anonymous
And can we make a array of string using char*words[] = {"Harry","jaggu"}; like this
Mehrad
Can anyone pls explain me what's the char**ptr See char *ptr means we are declaring a char pointer but what's char**ptr
char is a type char* is pointer to char type and char** is a pointer to char* because all pointers are variables themselves you can point to them (save their address as value)
Mehrad
and it's better to use const char* instead of char* every where you have string litteral like "ASDasd"
Anonymous
char is a type char* is pointer to char type and char** is a pointer to char* because all pointers are variables themselves you can point to them (save their address as value)
In simple words it means char ptr[] represent array of character and Char*ptr[] represent array of string or array of character pointera
Azadi
"djfhash" is a const string literal
Anonymous
But when to use char*ptr
Mehrad
But when to use char*ptr
when you have string litteral hardcoded in your program
Anonymous
And in book there is char**ptr 🥲
Anonymous
when you have string litteral hardcoded in your program
Ok till easy and intermediate i will not have those questions which require this array of string
Mehrad
And in book there is char**ptr 🥲
when you want to allocate strings dynamicly or point to 2d array
Anonymous
when you want to allocate strings dynamicly or point to 2d array
Ok we use Char*ptr and ptr= (char*) malloc (n*sizeof(char)) so here ptr is allocated dynamically and char**a=&ptr; Here a is pointing ptr Like this?
Azadi
But when to use char*ptr
The name of a char array decays to a char* easily. It depends on the situation you may need such a pointer. Or something like: char ch {'f'}; char* pch {&ch}; Better alternative is using std::string or std::vector<std::string> (ofc if you code in C++)
Mehrad
🥲idk Havent use 2d array much
so what is your need? if you want a simple string you can use char a[100] const char* a them the first for runtime mutation and the second for string litterals
Anonymous
lme show an example int a[10][20] how can you point that and iter over that?
See If u use char*words[] Like this nd store some string in this array And in function call we use char**ptr to point these type of arrays
Mehrad
See If u use char*words[] Like this nd store some string in this array And in function call we use char**ptr to point these type of arrays
const char* word[] = {"a","b","c","d"} for (int i=0;i<4;i++) cout << word[i] << endl;
Mehrad
Haven't learn c++ idk cout etc😢 But will learn it soon
so replace cout statement with printf("%s\n",word[i]);
27Onion
const char* word[] = {"a","b","c","d"} for (int i=0;i<4;i++) cout << word[i] << endl;
should be std::cout and std::endl since neither using namespace std; nor using std::cout, std::endl has been written before this line
Anonymous
Which language i should learn first?
Anonymous
C#
Anonymous
C#
🥲
Anonymous
Bro learn python if u are newbie in programming It will help u in many things too
Anonymous
for what?
To become good programmer
Anonymous
To become good programmer
Learn c if u are first year or second year student or a school student
Anonymous
Learn c if u are first year or second year student or a school student
After that c++ But one advice don't leave in between
Anonymous
why not C#?I m learing C#first cause ı like it more