Oleksandr
okay, this pictures starts to enraging me
Александр
** and pattern too
Last two pattern seems counterintuitive for me: in **** it seems that last element is nearest prime number that less than N^2; and first number in ********* is N* ((N+1)^2)?
Anonymous
Why the following C programme gives compilation error:
Anonymous
#include <stdio.h> int main() { extern int i; printf("%d ", i); { int i = 10; printf("%d ", i); } }
Oleksandr
move extern to global scope
Dima
If someone will post an assignment you’ll get a warn
Anonymous
#include <stdio.h> int main() { extern int i; printf("%d ", i); { int i = 10; printf("%d ", i); } }
Anonymous
If someone will post an assignment you’ll get a warn
This not assignment I am working professional and preparing for interviews
Oleksandr
rm extern word, or move that line before main
Dima
Hoba
Anonymous
Yes.. It is giving error
Till
Which error?
Undefined reference of course
Anonymous
Oleksandr
Still this failed
Compile both files, current one and one with int i; definition
Mat
Still this failed
Give us at least the errors. Are you preparing an interview and you can't even ask a question properly?
Anonymous
Undefined reference of course
Yes undefined reference to i
Александр
Yes.. It is giving error
Are there definition of i outside of main function? What means keyword extern?
Mat
Yes undefined reference to i
Have you searched what the error mean on the net?
Anonymous
Mat
Got it. When I define I outside main it compiled.
Why does that program work this way?
Oleksandr
I said it to u 3 times above
Anonymous
Yes.. Thanks
Anonymous
why only 4 values are printed? when i have 5 in the printf statements...and also,i did google how the sequence of statements in printf get evaluated..they referred to see sequence points..but couldn't figure anything from it..care to explain?
Mat
2 3 3 2 3
Anonymous
wait what
Anonymous
where did i miss the comma?
sara
Between i and a++
sara
Printf("%d,%d,%d", i, i++, ++i); Printf(",%d,%d", a++, ++a);
Anonymous
thanks
sara
Its cool
David
/rules
Mateo
Which are pre processed during compilation process
Are you sure? I thought the preprocessor only touched macros, so if it were #define x 5 Then the preprocessor would do that. But placing a declaration in global scope I thought the variable went to static memory (.data) and then it worked as a regular variable (a.k.a having a place in memory where it is stored, not just being an immediate)
Pavel
is there a cross-compiler way to know at compile time what version of C++ is used? I want to make std::lerp function implementation that can be replaced by standart one when my project is transferred to C++20
Mateo
Pavel
C++20 adds a lot of useful stuff that was usually reinvented in every project
Ludovic 'Archivist'
C++20 adds a lot of useful stuff that was usually reinvented in every project
Still lacks lots of my everyday stuff, like fixed endianness integers, forcefully packed structures...
YVEF
Hi everyone:) who can help me? I want to include boost in KDevelop project on Windows
olli
Still lacks lots of my everyday stuff, like fixed endianness integers, forcefully packed structures...
Just to get it right, by fixed endianess you mean sth like "low endian" everywhere?
Mihail
read the rules
Mihail
also that question made 0 sense
Lelouch
Help
klimi
Help
what the matter?
Mihail
no one will write it for you
Mihail
i told you to read the rules
Lelouch
Ok chill dude
Lelouch
Fo
Mihail
and stop deleting your messages.
Mihail
Ok chill dude
i'm chill
Lelouch
and stop deleting your messages.
Why do u have problem in my every msg
Mihail
Why do u have problem in my every msg
Why don't you read the rules and see for yourself?
Anonymous
Ok chill dude
Bro...u are doing good..means you are practicing questions..and that's a good thing..but you are not writing them by yourself..you just asking question straight forward.. Please try to write program first
Lelouch
Just need logic
Mihail
you basically just need someone to write your program
Lelouch
Mihail
and that's not happening
Lelouch
Approach
Mihail
Deletion of msg shouldnt be a rule
you shouldn't be the one telling me the rules
Mihail
Logic
that's literally everything for a logic-based question
Anonymous
Logic
Bro calm.. Dont fight here...just learn and let learn others.. Stay calm
Mihail
it's a question to test your logic, not your programming
Anonymous
Logic
I told you one algo previously... For the question you asked previously.. Should you try to write its program..?
Ludovic 'Archivist'
Just to get it right, by fixed endianess you mean sth like "low endian" everywhere?
Like having a variable be always little endian and "normal" ints be converted to the correct endianness when assigned
Ludovic 'Archivist'
Or having it be always be big endian (which is my actual case)
Ludovic 'Archivist'
Because network protocols
Oleksandr
okay guys, can somebody help me to understand this task? https://www.hackerrank.com/challenges/magic-spells/problem
Oleksandr
do not pay attention to the "dynamic_cast part" of the excrcise, everything is clear here