Anonymous
klimi
?
Anonymous
nothing . talk to you later
Anonymous
have work
klimi
Ttyl
Anonymous
Ttyl
thanks again
klimi
Np
天下无敌
/get notename
Nasar Ul zain azran
Adios gonna leave group
Anonymous
Adios gonna leave group
As if we care lol
Anonymous
Is goto a standard keyword in C or do you need a specific library
Dibyajyoti
/purge
Anonymous
goto is a keywod in both C and C++
Would you use instead of a loop
olli
Would you use instead of a loop
If you're unsure whether to use goto, don't use it.
Anonymous
olli
Most of the time you should not use it, goto can be useful if you need to exit nested loops, because a break would only exit the inner most one. And goto can be useful for deallocation/freeing resources.
Anonymous
Hi
Anonymous
Is goto a standard keyword in C or do you need a specific library
It is, but using it is bad practice Especially in C++
Atul Anand
CLASS A have member function and member function OF CLASS A is friend function of CLASS B but CLASS B have no member function....how can i Access CLASS B useing that friend function
Atul Anand
András
András
Or wait
András
Do You mean, you want to declare that function as a friend, but without declaring any func?
Atul Anand
yes
András
Pastebin.com Ideone.com Gist.github.com
Anonymous
Message from Altron: https://pastebin.com/1p8mVKE1/?e=1
András
I don't know how to do it in normal way, but you can access anything anywhere using pointers. Even private fields in another class
András
okk...thank you András
Class A{ private: int x; public: int y; } A a; int *ptr =(int*)&a;//it is a.x ptr++//a.y
Ilya
Hi, I have a question about string manipulation in C: I have a variable called recv_buf that stores the response of an HTTP request: This is an example of that response: HTTP/1.1 200 OK Server: nginx/1.16.1 Date: Thu, 14 Nov 2019 16:25:05 GMT Content-Type: application/json Content-Length: 873 Connection: keep-alive Strict-Transport-Security: max-age=31536000; includeSubDomains; preload Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, POST, OPTIONS Access-Control-Expose-Headers: Content-Length,Content-Type,Date,Server,Connection {"ok":true,"result":[{"update_id":954163176, "message":{"message_id":2442,"from":{"id":xxxxxxxxx,"is_bot":false,"first_name":"Ander","last_name":"Mutuberria","language_code":"es"},"chat":{"id":xxxxxxxxxx,"first_name":"Ander","last_name":"Mutuberria","type":"private"},"date":1573668830,"text":"Test"}},{"update_id":954163177, "message":{"message_id":2443,"from":{"id":xxxxxxxx,"is_bot":false,"first_name":"Ander","last_name":"Mutuberria","language_code":"es"},"chat":{"id":xxxxxxxxx,"first_name":"Ander","last_name":"Mutuberria","type":"private"},"date":1573669034,"text":"Test"}},{"update_id":954163178, "message":{"message_id":2444,"from":{"id":xxxxxxxxx,"is_bot":false,"first_name":"Ander","last_name":"Mutuberria","language_code":"es"},"chat":{"id":xxxxxxxxxx,"first_name":"Ander","last_name":"Mutuberria","type":"private"},"date":1573669972,"text":"Test"}}]} Do you know how can I extract from that char each "id" and "text" value and save it to a variable? Thanks, any idea is welcomed.
This is Json, find any library for parsing JSON and parse it, then use the Json structure to extract needed fields
Ilya
when creating a makefile, how do i run different command based on input
Don't use make files ever. Forget about even existence of "make" command. Make cannot accept any input, so your question is strange. Make utility can only have fixed static rules like "to get .obj file you have to take .c file and apply this command to it"
Anonymous
pollux90@mail.ru
Darik
Anonymous
pollux90@mail.ru
icq username»Hitup if you any good at hacking ##^%
Etaoin
Etaoin
why is this code illegal
Anonymous
can you use enums as values for cases in switch statments
Anonymous
like enum values
Anonymous
Ludovic 'Archivist'
I think it is an ambiguous template resolution: same template argument Ty have two resolutions as the row normalize and the matrix normalize
Ludovic 'Archivist'
can you use enums as values for cases in switch statments
If you are in C++ I'd even advise to use enum classes
Anonymous
can you call a function within a paremter of a switch statemeent
Anonymous
switch(somefunciton())
Ludovic 'Archivist'
SH
What if that function returns a string pointer or a null?
Anonymous
Depending on the return type you can
what if you are trying to return an enum
MᏫᎻᎯᎷᎷᎬᎠ
what if you are trying to return an enum
Whatever you are trying to return, it must be a literal or primitive
Javi
what if you are trying to return an enum
Take into account that enum has an underlying type (usually int), so any function or expression returning that type will work, because the switch statement will only "see" whatever is returned. Also since C++ there are two types of enum. You can read about it here: https://en.cppreference.com/w/cpp/language/enum
Anonymous
can i do something like that
Ilya
can i do something like that
Yes it is possible.
Ilya
i am using C , int choice; switch(choice = StringorInt())
read CPR https://en.cppreference.com/w/c/language/switch
Ilya
i am using C , int choice; switch(choice = StringorInt())
But I would not mix assignment and SWITCH -- it's bad style. Either int choice = StringorInt(); switch(choice)or switch(StringorInt())look nicer
Javi
can i do something like that
It's possible, but it only makes sense if you are also going to use choice later. The two options that @MasterZiv gives are cleaner
Ибраги́м
https://github.com/DeanRoddey/CIDLib
Anonymous
https://pastebin.com/ZZhnRxQH when I choose perform all the program gets fucked in the palindrome function. All I did was to call that function.
Anonymous
Anonymous
When I choose the palindrome itself(4) it works fine. but in performAll (6) itgets fucked it prints a value "-677380054"
Javi
When I choose the palindrome itself(4) it works fine. but in performAll (6) itgets fucked it prints a value "-677380054"
In primeAndComposite you don't initialize count, and in palindrome, you don't initialize rev, so you'll have undefined behavior
Ilya
Find and Read this book
Dima
it’s '/report'
Dima
lol
m
Can anyone tell me why is this happened!
Anonymous
How to setup code blocks for network programming in c++