Anonymous
Hi guys
Roxifλsz 🇱🇹
No I use my hands
Wow comedy humor 100, absolutely golden funny
Roxifλsz 🇱🇹
Hi guys
Hello
klimi
Wow comedy humor 100, absolutely golden funny
You dont have to shutdown me like that :(
Anonymous
what does it mean?
Vlad
what does it mean?
The chat has been cleaned up from bs
Anonymous
ow. is it?
Anonymous
bs means bullshit.
Anonymous
I think
Anonymous
yeah
أسامة
bs means bullshit.
oh this is a new abberviation (adding it to the dictionary)
Anonymous
It is quite common actually
Anonymous
not that new
أسامة
It is quite common actually
is this also new infomation (adding ....)
Anonymous
👍
Anonymous
Can I assign the elements of one array as values to another array in C?
Anonymous
Anonymous
Suppose I have a character type array and another integer array. Can I assign the integer array as values to the character array using memcpy?
أسامة
google memcpy
btw, is there is c++ way other than a simple C function?
أسامة
std::copy
oh i will google it :)
Vlad
std::copy
It also will copy char array to integer array properly
Anonymous
No
any suggession how can i do this. I am stuck with an university assignment
Anonymous
C
Vlad
C
Then for loop :P
Vlad
and simple assignment
Anonymous
ok
Indolent
int* kaka = new int[somethingElse.size()]; // What's happening in the above line?
Alex
looks like illegal code. what is kaka.size()?
Dima
lol you can’t use size() of a pointer
Dima
totally illegal
Indolent
I'm the gangsta chick, aint nobody's out there gonna stop my code
Indolent
i don't think so big guy
Indolent
oh surprise surprise, i just compiled it and IT RAN
Indolent
int dima = -20; int vlad = 0; int indolent = 100;
Indolent
I'm unkillable
Vlad
<source>:3:30: error: request for member 'size' in 'kaka', which is of non-class type 'int*' 3 | int* kaka = new int[kaka.size()]; Well, not really
Indolent
mine didn't
Vlad
Cuz you had global with exact name
Vlad
-Wshadow -Werror and it wont compile
Vlad
Surprise
Indolent
what else do you expect? like that's a snippet. of course you gotta declare the array
Indolent
oh fuck
Indolent
omg
أسامة
and that use could recognzed as prototypes
Indolent
vector<int> something; int* somethingElse = new int[something.size()]; // Update.
أسامة
but it shouldn't , if you use C++ (and not C) C is so tolerated with behaviors like that
Indolent
That obviously would work
Alright, Now in the simplest possible language tell me what's happening?
Vlad
Alright, Now in the simplest possible language tell me what's happening?
You take a size of you vector, which will be 0, since you haven't pushed anything to it
Indolent
and make a int type array of that size eh?
Vlad
Then you'll call operator new with zero size
Indolent
ah ok
Indolent
int[3] // what's the meaning of this in a nutshell?
Vlad
int[3] // what's the meaning of this in a nutshell?
it could mean anything :P. array of size 3? Pointer to array of size 3?
Indolent
gotta be the first one
Vlad
Its int arr[3] and int (*p)[3] respectively
Indolent
actually I never even bothered to learn "arrays" since I found "vector" so damn easy lol!!
Indolent
Hah
Vlad
vector<int> something; int* somethingElse = new int[something.size()]; // Update.
Also dereferencing that would be UB. Hence zero size thingy
Indolent
ummm okayy
Indolent
*takes Nils in the corner*
Indolent
Can I join?
18+ stuff missy
Roxifλsz 🇱🇹
Extremely high IQ conversation above
Roxifλsz 🇱🇹
inkfil
Anyone here who have tried web programming (web application development) in C++