Laopigo
Egro
Push_back() Dumb this down please
Egro
The definition is weird, saying to push back one element to a vector , while it is actually adding an extra element to a vector. Should it be define as : adding an extra element to the end of a vector ?
Anonymous
Hello, Can anyone have C4droid app for coding? If anyone have please share to me....
D
You used a different name for the 2 functions. my question is what if both of them use the same name Thanks for replying
You can create function with the same name but various amount, types of values that functions is receiving Also it's possible to create function with the same name in two inherited classes by using keyword virtual and pointers After that you'll be able create pointer to the base class and allocate memory for virtual class and call function for them.
Hanz
Define pi in capital i.e PI
not always, he just put one space after # so it becomes # define instead of #define
Hanz
maybe that's the case, i never know any compiler generalize that
Dastan
how to make own c++ compiler?
Anonymous
maybe that's the case, i never know any compiler generalize that
Well maybe but macros are always in capital...
Anonymous
how to make own c++ compiler?
Download and install a compiler boom you are done .. Thanks me later
Ammar
Macro is not always capital, you can use lower case to define a macro of course. And also #define aaaa and # define aaaa are the same thing, the space after the hashtag # does not matter.
Ammar
That should be #include.
Dastan
Download and install a compiler boom you are done .. Thanks me later
brother i mean c++ made by me the first screen ? i try by reverse engineering but it failed
Anonymous
That should be #include.
Wow amazing I didn't knew that up to now thanks..
Anonymous
Then what should be the problem
Dastan
Then what should be the problem
only have black screen
Anonymous
Whaat?? *visible confusion*
Yup 😐 so what .... It is normal
Hanz
Yup 😐 so what .... It is normal
So you don't pass the Hello World exam in C/C++? I'm in doubt
Anonymous
So you don't pass the Hello World exam in C/C++? I'm in doubt
I haven't give exam I am just a beginner and yeah I learn by my own
\Device\NUL
how to make own c++ compiler?
Just look at the source code of open source compiler like GNU Compiler Collection or Clang
Sileno
How to debug a external process using Clion and Attach to Process. I try, an error appears and it doesn't work: "com.jetbrains.cidr.execution.debugger.backend.gdb.GDBDriver$GDBCommandException: ptrace: Operação não permitida. Debugger detached"
ɛ n h ᴀ n c ɛ ґ 🧟‍♂️
Can someone please write me a code to remove duplicates from a string
klimi
Can someone please write me a code to remove duplicates from a string
https://www.geeksforgeeks.org/remove-duplicates-from-a-string-using-stl-in-c/
klimi
need more context, what system are you using? what compiler?
Anonymous
Please I want code that can do something like this
Anonymous
Input: n = 3 Output: 012 013 014 015 016 017 018 019 023 024 025 026 027 028 029 034 035 036 037 038 039 045 046 047 048 049 056 057 058 059 067 068 069 078 079 089 123 124 125 126 127 128 129 134 135 136 137 138 139 145 146 147 148 149 156 157 158 159 167 168 169 178 179 189 234 235 236 237 238 239 245 246 247 248 249 256 257 258 259 267 268 269 278 279 289 345 346 347 348 349 356 357 358 359 367 368 369 378 379 389 456 457 458 459 467 468 469 478 479 489 567 568 569 578 579 589 678 679 689 789
Anonymous
Even if I increase n
Anonymous
To 8
Anonymous
I have done some work on it but it is not giving me what I want
Otumian
What is the output when n = 1
Іван
hi, how can I output the result of void function in textBox? textBox5-> Text = .... (what's next?)
klimi
result of void? void does not have any output
Golden Age Of
tim
for real you should use double
Golden Age Of
no no no
Oh, I didn't read above, I just said about some words
tim
Oh, I didn't read above, I just said about some words
me neither, i just trolled bc real numbers = double/float
klimi
For real, void is return type
yes.... it is return type... but try creating variable with the void type
klimi
void pointer ,there we go
no.. no... not a pointer... just void
klimi
:(
if you want to return something... use other data type
ɛ n h ᴀ n c ɛ ґ 🧟‍♂️
https://www.geeksforgeeks.org/remove-duplicates-from-a-string-using-stl-in-c/
But can you do it with a for loop bro? I’ve tried many times and i don’t get the answers i expect
olli
But can you do it with a for loop bro? I’ve tried many times and i don’t get the answers i expect
Where is your code? What did not work? What's wrong about using unique?
ɛ n h ᴀ n c ɛ ґ 🧟‍♂️
ɛ n h ᴀ n c ɛ ґ 🧟‍♂️
Where is your code? What did not work? What's wrong about using unique?
When i input a word like “hello” it works fine But when i input “Mississippi” it doesn’t give the right output
Кто-то
I'm implementing octree data structure. In octants i store triangles. So question: When i need to to stop dividing octants in Octree? I think about max depth or number of max number of triangles in octant, but how i can calculate this values?
olli
When i input a word like “hello” it works fine But when i input “Mississippi” it doesn’t give the right output
your code also fails for "aaa" (which is probably the simplest example). This is because if you encounter the same character, you just remove it. However the next one could be the same as well. Hence you could fix it by changing your if to a while. In this case you would remove all of the same characters, until you find a 'new' one.
drinktoomuch
can we have a function in function in c++ ?
មួង អាទិត្យឆវ័ន្ត
can we have a function in function in c++ ?
we can use Lambda expression instead of real function in function.
drinktoomuch
hmmm thank you for your suggestion
មួង អាទិត្យឆវ័ន្ត
hmmm thank you for your suggestion
this's exmaple auto sum = [](){ int a = 5; int b = 10; return a + b;}; or int a = 5; int b = 10; auto sum = [=](){return a + b;};
GandolfAF
I tried posting but it was deleted. Gist is I keep getting this error despite research and trying different paths. OS is recent version of OS X. Using the cktan/tomlcpp library and it's installed via make and make install. LD_LIBRARY_PATH didn't fix it. Dropping the files into the project dir didn't clear the error either. I am at a loss, as is google. Repo on github at tsasser05/cryptoTracker Any ideas what I should do to get the compiler to find the TOML lib? └─ ▶ g++ main.cpp Transaction.cpp Coin.cpp -o coin -std=c++17 -Wall -I/usr/local/lib/ -I/usr/local/include Undefined symbols for architecture x86_64: "toml::parseFile(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from: _main in main-a92e6a.o "toml::Table::getTable(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const", referenced from: _main in main-a92e6a.o "toml::Table::getDouble(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const", referenced from: _main in main-a92e6a.o "toml::Table::getString(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const", referenced from: _main in main-a92e6a.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
drinktoomuch
we can use Lambda expression instead of real function in function.
thank you very much bro i have finally solved the problem :)
Anonymous
Thank you Rose
Talula
hi, how can I output the result of void function in textBox? textBox5-> Text = .... (what's next?)
Which void function? I could get you a work around but I see you're using C++ Builder.
Talula
Depends on what you want to do and depends on your budget.
Talula
Do you want to program Windows GUI / CLI or Web Server?
Talula
That was a question that couldn't be answered in "Ya, Yes"... so what are you planning to program, if you want to have good decent access to all 3 I would suggest go for Visual Studio Community Edition.
Talula
I didn't say Visual Studio Code... I said "Visual Studio Community Edition"... I'll send the link.
Talula
https://visualstudio.microsoft.com/downloads/
Talula
What's the difference between Visual Studio code & Visual Studio?
Visual Studio Code is an Editor... Visual Studio Community Edition is a free IDE (Integrated Development Environment).
Talula
Please delete your code or you'll get a warning from Admin, it is not allowed to post code directly... you have to use pastebin