Dima
(bad practice for multithreading, but you get it)
Anonymous
pointer just points to any object in memory
you need to use pointer to access memory or you will be just using a copy of the variable
Anonymous
@CanerASLAN
Anonymous
calloc has two arguments first — count of elements to alloc second — size in bytes of each element
char **words = malloc(5 * sizeof(char*)); for(int i = 0;i < 5;++i){ words[i] = (char *)malloc(20+1); }
Anonymous
this worked
Anonymous
for(int i = 0;i < size;++i){ free(words[i]); } free(words);
Anonymous
then i free each member of array then the array itself
Anonymous
lets compile and see what happens lol
Howl
#googleit
I tried searching Google :D just i don't understanding the logic
Dima
I tried searching Google :D just i don't understanding the logic
do you have knowledge with high level languages?
Howl
No.
Dima
or nevermind then pointer just points to object in memory kinda proxy for its object
Howl
What problems do I encounter in the future if I skip pointers
Howl
or should I work more? :D
Dima
What problems do I encounter in the future if I skip pointers
a lot, but you can use std shared_ptr (well you better get to know pointers)
Dima
its really easy as you get it
Howl
okay, I will. Thanks
Francisco
a lot, but you can use std shared_ptr (well you better get to know pointers)
Just a little point, most of the times unique_ptr would probably be more suitable
Dima
yeah I thought about this later
Ilya
Hi everyone? Where can we learn pointers? (with details) because I still don't understand ... where will it be useful? Can you give an example?
If you skip pointers you will not be able to build all effective data structures and ability to work with array s. Although you still will be able to write and understand some programs
Alexander
is this the only way to pass a reference to an expression without creating a temporary variable? void handle_foo(Foo*); handle_foo(&(Foo[]){ get_foo() }[0] );
Dima
Alexander
This is for generated code of course.
Anonymous
`qsort(words,size,stringlength,alphabetical_Order);``
Anonymous
there is an issue with my qsort lol
Anonymous
qsort(words,size,sizeof(char *),alphabetical_Order);
Anonymous
this was the fix for sorting array of strings
professor
Simple login vs openid + oauth2 vs oauth2 in a desktop app?
professor
And what is the problem?
which one would I implement or even better which scenarios?
Ilya
Simple login vs openid + oauth2 vs oauth2 in a desktop app?
Why at all do you need Web authentication in a desktop app?
Ilya
which one would I implement or even better which scenarios?
Which one is better I will not tell you, though...
professor
Why at all do you need Web authentication in a desktop app?
click-based auth than writing username/password beside I don't want to store passwords
Mat
Ricky no self-promoting, thank you
Anonymous
I use archlinux, have boost and boost-libs installed. But I get error when compile the code, anyone can help?
Anonymous
don't know why deleted gist link. Cannot post gist link here...
Ilya
don't know why deleted gist link. Cannot post gist link here...
no one will be able to help until you show your error messages. use pastebin.com
olli
don't know why deleted gist link. Cannot post gist link here...
https://gist.github.com/i6o6i/34a0d83d154d1238715fbe86734e5b54
Anonymous
thanks
olli
I use archlinux, have boost and boost-libs installed. But I get error when compile the code, anyone can help?
your size should match the boost::extents "dimension", e.g. boost::multi_array<double,2> a(boost::extents[3][4]); or the whole code #include <stdio.h> #include <boost/multi_array.hpp> int main() { boost::multi_array<double,2> a( boost::extents[3][4]); for(size_t i=0;i<3;i++) { for(size_t j=0;j<4;j++) { a[i][j]=3; } } return 0; } https://godbolt.org/z/Q9n-4r
Anonymous
Ohh, I fogot that, but I still cannot compile the program. Need I explitly link boost libs when compile? like -lboost
Anonymous
Ok.. I just use gcc to compile...
Anonymous
I think gcc and g++ is the same, in some way. But I was wrong. Thanks btw. All solved
01000001011011010100000101101110
/ban again
Anonymous
How to install code blocks
01000001011011010100000101101110
Anonymous
Bakla
Dima
What the hell
Joesph
How to install code blocks
If i were a terrorist goddamn i would've killed you
01000001011011010100000101101110
If i were a terrorist goddamn i would've killed you
I thought terrorist were smart people..lol
Dima
/ban again
/warn Command abuse
Dima
Bakla
what does it mean
Anonymous
Nguyen
klimi
/ban
Blue text must click
Dima
What the fuuck
Dima
why do you have to click all these commands
Ибраги́м
Epochs: a backward-compatible language evolution mechanism http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1881r0.html
Anonymous
Pm fast limited time
Pavel
/report is this AD?
Anonymous
https://www.meetup.com/C-India/
Khan
https://pastebin.com/Mi2NTuVq why if i choose nomber 2 i couldn't delete one of the name above ?,i have tried but i don't know the syntax
Breezy
Hello guys
Breezy
What's up there!
Ricardo
Hey guys, i going to create an mini project about quiz game, but i dont know where should i start at, can anyone help me 😂tks
Ricardo
I need a menu include : start game, score ( folder), clear score, add question and answers
Ricardo
Can i use structure to add question ?
Anonymous
/warn twitter account ad
Anonymous
Can i use structure to add question ?
You can use everything you want to
Anonymous
/ban joined via upwork ban link
Ricardo
You can use everything you want to
I just have learned very basic, i have no idea with this 😂
Ricardo
I also dont know is it possible
Roxifλsz 🇱🇹