Anonymous
not even close
What might make any programmer smarter than Linus Torvalds!
Mar!o
Anonymous
successful compilation of a 10K lines of code in first try
This might do it. But is there any proof that Linus is less than that? I mean what makes you sure Linus did not do similar things or, as I think, greater?
Note: Codes are not measured in kilos, lines, or bytes. It is about what a code could do sufficiently.
wu
class Solution {
public:
vector<int> a(1);//wrong: why wrong?
vector<int> b = { 1 };
int d[1];//right
void foo() {
vector<int> c(1);//right
return;
}
};
//why cannot define size to a vector<int> as global variable, but it's ok in a function?
//I can not find the answer in book or google, could anybody help with this, thanks!🥺
Amrith
And they teach shit here
Every college in India is shit. Most of my friends just by heart code to pass. They study more theory to pass
Anonymous
Amrith
Anonymous
Amrith
where do i learn algorithms and data structures course? Are there any recommended courses ? I like video over books
Ehsan
.
Hi
.
unknown file error seh exception with code 0xc00000fd thrown in the test body any one who has idea about this *Google Test*
particaney 🐸🍲
Hey guys I really need help. I have a vector<vector<int>> in a header file and i am not able to use it in the cpp file
particaney 🐸🍲
I dont know the size so I want to instantiate after
'''''''
Amrith
'''''''
Generation Z
C and C++ are super complex
Diego
Amrith
C and C++ are super complex
Just break down to simpler parts and learn that's the best way if you feel that its difficult. Keep practicing on a real machine. Read docs that will help you
Anonymous
Anonymous
Anonymous
/report
Pavel
You
Anonymous
Hi
Mahdi
Hi
spartak
Hi
Mahdi
I want to practice c++ but i don't know how?
Is anyone here to help me?
Anonymous
Anonymous
like language features, solving problems with C++, structure bigger projects in C++? There are many things you can practice to become an overall better C++ developer.
particaney 🐸🍲
Anonymous
You might want to check out competitive programming sites like codeforces. You can solve problems there and get used to the C++ syntax. For modern features i would still siggest to give bigger projects a try and read learncpp. Most of competitive programming boild down to algorithms and datastructures, you don't really learn any in depth language features or how to structure code correctly while doing it. It is still good to learn the syntax and for some practice to improve coding speed etc.
Mahdi
Ehsan
Ehsan
Some people can understand concepts and use them fairely quickly while others don’t. Don’t compare yourself to others and do what you can do
+
hey guys, in python I have this code, I think its install an event for a widget in dobleClickMaximizeRestore
def uiDefinitions(self):
def dobleClickMaximizeRestore(event):
# IF DOUBLE CLICK CHANGE STATUS
if event.type() == QtCore.QEvent.MouseButtonDblClick:
QtCore.QTimer.singleShot(250, lambda: UIFunctions.maximize_restore(self))
## REMOVE ==> STANDARD TITLE BAR
if GLOBAL_TITLE_BAR:
self.setWindowFlags(QtCore.Qt.FramelessWindowHint)
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
self.ui.frame_label_top_btns.mouseDoubleClickEvent = dobleClickMaximizeRestore
I want to use this code in c++ but I dont have any Idea for it
anyone can help?
Anonymous
int main ( ) {
int a ;
switch ( a ) ;
{
printf ( " DEER " ) ;
}
printf ( " LION" ) ;
} what is a output of this program?
Sergio
DEER LION
.
Any google test c++ expert need help plzz
armandofsanchez
Anonymous
Giorgi
Anonymous
MᏫᎻᎯᎷᎷᎬᎠ
GCC 11.1 Released
https://gcc.gnu.org/pipermail/gcc/2021-April/235922.html
https://redd.it/mzpfyj
@r_cpp
Anonymous
0x11C974489c7f179893D70f8F422B245079eEe260
Md
Hi guys can you help me for solve this question
Anonymous
K A L V I N
/python
K A L V I N
Anyone have python notes
Dima
K A L V I N
Sorry
Talula
K A L V I N
Dima
/warn it’s c++ group. NOT PYTHON
Pavel
Dima
Queque
Pavel
Qooyeooye
J
/warn
shlomo
A function that get a structure that contains a pointer to a array of sentences, and the amount of sentences. and returns a structure that contains a pointer to an array of words, and the amount of words (the sentences are split into words).
In the current function, a primary loop that through a sentence, and a secondary loop that through the one sentence.
During the loop, each character of the sentence is copied to a new word, until space. and move to the next word after the space.
The problem is, writing to the pointer of the current word overwrites the previous word, rather than copied to its right place.
You can notice that in later words, there is a basis of the previous words.
(The program "on the fly" after the fourth word)
Expression:
Sentences spilt(Sentences sentence) {
Sentences words = {nullptr, 0};
int basic_size = 5;
int arr_size = 5;
int num = 0;
words._data = new(nothrow) char *[basic_size];
for(int i = 0; i < sentence._num_of_sentences; i++) { // iterate though serntes
for (int sent_inter = 0, words_inter = 0; sent_inter < strlen(sentence._data[i]); sent_inter++) { // iterate though words
//next new word
if (sentence._data[i][sent_inter] == ' ') {
words._data[words._num_of_sentences][words_inter] = '\0';//endline
++words._num_of_sentences;
words_inter = 0;
continue;
}
//copy correct character to correct word
words._data[words._num_of_sentences][words_inter++] = sentence._data[i][sent_inter];
//cout << words._data[words._num_of_sentences] << endl;
}
++words._num_of_sentences;
}
return words;
}
Temp result:
Input:
qwe rty uio
asd fgh jkl
zxc vbn
output:
q$g☻
qwg☻
->qwe☻
r↓♦️
rt♦️
->rty☺️
uwe
uie
->uio
aty
asy
->asd
now break🤬
Mamba
Get cppbookguide
shlomo
Get cppbookguide
* Asking for book recommendations is ok, but "pls give pdf book" is not allowed, find books by yourself. Posting illegally copied books (or links to those books) is also not allowed and will get you BANNED.
Mamba
Mamba
Black
Please who’s from India or Russia and is good at programming.
+
I have another question
I want to know its ok to declare multiple function inside of 1 header (all in one class) and then put some of them in one cpp file and other to some other cpp file?
Anonymous
Welcome Marsad Abdullah. I am not a bot.
Anonymous
Ehsan
Anonymous
Ehsan
Anonymous
Ehsan
read his message
LDNa
Boy na how