Hardik
Anybody has how to get oops project on C++
Anonymous
hey guys please am trying to install the kits for qt creator but is not working please can someone help me with a link or something to help
Anonymous
Hello guys, help me please, i need function for outputting the sum of 3 arrays
Anonymous
what’s wrong with it?
I can’t find such a function on the Internet, it only gives a function to display the sum of all the elements of the array, and I need the sum of the arrays
Ricky
Hayhakaoau
Ricky
Nsbzimwns
Dima
@hmmmmmhmm
Dima
want to be banned?
Ricky
🙈
Anonymous
Anonymous
i add my friend here
Anonymous
and for this i should be ban?
Dima
yeah sure
Emir
How can i detect most used word sort algorithm in file?
Emir
Did you try Googling it?
i did, but i didn’t find something about that topic
NXiss7
Did you try Googling it?
It'd give you lots of examples. But I think you can try reading file, tokenized using space and add to a list, maybe as a struct containing both word and the count.
NXiss7
i did, but i didn’t find something about that topic
Well, then I suggest practicing on "Googling things", especially in English. https://www.javatpoint.com/program-to-find-the-most-repeated-word-in-a-text-file
NXiss7
I tried linked-list to handle datas
Did you try what I said? I'm sure there are better ways to do that, that's just off of my head...
Anonymous
Güzel taktik knk :D
/warn non English
Anonymous
Hayhakaoau
/warn ???
Dima
admins are so ??? here
Anonymous
/warn Immortal PMing to chat users
Hermann
Hola
Dima
Hallo
vkphrl
Hi
abdullah
hi
Dima
😒
I_Interface
Sinan
void reversePrintFile() { FILE * dosya = fopen("odev.txt", "r"); FILE * dosya2 = fopen("deneme.txt", "w"); fseek(dosya, -1, SEEK_END); int len = ftell(dosya); len++; while(len--) { char ch; fscanf(dosya, "%c", &ch); if(ch >= 97 && ch <= 122) ch = ch - 32; fseek(dosya, -2, SEEK_CUR); fprintf(dosya2, "%c", ch); } } This code works on Mac, but not in windows I didnt figure it out Can someone help me ?
Hermann
Hi
I waiting 🙄🙄🙄
I_Interface
I waiting 🙄🙄🙄
Stop offtoping here.
Hermann
👍👍👍
Hermann
Post errors
Sinan
i opened the file in "rb+" mode and problem was solved thank you
Ибраги́м
https://github.com/DaanDeMeyer/reproc
Sergey
Hello everybody, I have such interesting question How to erase or delete from vector of unique_ptr's to incomplete type? I try: auto found = find(cars.begin(), cars.end(), car1); found->reset(nullptr); cars.erase(found) When I use found->reset(); Debuger lead me to unique_ptr.h:402 static_assert(__is_invocable<deleter_type&, pointer>::value, "unique_ptr's deleter must be invocable with a pointer"); using std::swap; swap(_M_t._M_ptr(), __p); if (__p != pointer()) get_deleter()(std::move(__p)); // 402 } When I try with `` Debugger leads to unique_ptr.h:81 { static_assert(!is_void<_Tp>::value, "can't delete pointer to incomplete type"); static_assert(sizeof(_Tp)>0, "can't delete pointer to incomplete type"); delete __ptr; // 81 } ?
MᏫᎻᎯᎷᎷᎬᎠ
https://github.com/lamarrr/STX?files=1
MᏫᎻᎯᎷᎷᎬᎠ
❤️
Sachin
Hi
Erkin
Hello
Nyuke
https://pastebin.com/M9CMWhkD
Nyuke
this takes input infinite times
Nyuke
altho the loop is for a finite value and the size of arr is also finite
Sergey
1) use found->reset();, not found->reset(nullptr); 2) you are erasing the object referenced by the iterator anyway. why call reset before that. let the destructor handle it
1) And as I already wrote the result of it When I use found->reset(); Debuger lead me to unique_ptr.h:402 static_assert(__is_invocable<deleter_type&, pointer>::value, "unique_ptr's deleter must be invocable with a pointer"); using std::swap; swap(_M_t._M_ptr(), __p); if (__p != pointer()) get_deleter()(std::move(__p)); // 402 } 2) The thing is erase doesn't call for object destructor if a collection holds pointers to objects https://stackoverflow.com/questions/6353149/does-vectorerase-on-a-vector-of-object-pointers-destroy-the-object-itself
Anonymous
https://pastebin.com/M9CMWhkD
In 2nd for loop j++ instead of i++
Anonymous
https://pastebin.com/M9CMWhkD
using VLAs in C++ is bad style, use std::vector please replace int arr[n]; with vector<int> arr(n); PS: 1) you need to #include <vector> 2) this is still bad style, but it is a direct translation from C style to C++ style
Nyuke
nvm i'll use vector, thanks for the hint tho
Sergey
1) need the source code or a manual for the type found::element_type and found::deleter_type
Can I send you invite link to gitlab? Cause there are not so little files
Anonymous
vector uses more memory than arrays?
maybe, but VLAs are unsupported in ISO C++
Anonymous
btw there is an offtopic group #ot
Anonymous
Sergey
see if @QNeko's solution fixes the issue
I tried But doesn't know either this advise doesn't help or this style of destructors shouldn't help https://pastebin.com/A1aUcqgr
Anonymous
Anonymous
I tried But doesn't know either this advise doesn't help or this style of destructors shouldn't help https://pastebin.com/A1aUcqgr
okay and how are you declaring the vector? std::vector<std::unique_ptr<Car>> cars;?
Anonymous
or did you explicitly mention a deleter function?
️Tony | Never DM You First
Hello
Hermann
hi
️Tony | Never DM You First
who can help me for c ?
Hermann
who can help me for c ?
all members, share code if it does not work