Anonymous
😂😂😂
I'm serious
Anonymous
a is a pointer!
Goddam Read the standard, dude
Anonymous
It's an made up terminology
Anonymous
a is a pointer!
which IDE is this?
Anonymous
which IDE is this?
Visual Studio
Anonymous
yes a is const pointer
kvark
Visual Studio
ok, you're right...
Anonymous
ok, you're right...
What convinced you?)
Anonymous
I've already launched a VS to show that it is a separate type :)
kvark
Hes right, as minimum as sizeof() works in different way. Also i found this stuff in specification
Anonymous
Great
Do you want me to show this?
Anonymous
Yes. Show it. We will learn something
Anonymous
You need to wait a little bit
Anonymous
Ok.
Samiran
It's an made up terminology
https://www.codeproject.com/Articles/26753/Compiler-in-Action-C-C-to-Machine It’s real though
Anonymous
No problem.
Anonymous
https://www.codeproject.com/Articles/26753/Compiler-in-Action-C-C-to-Machine It’s real though
Prolog and epilog it's about how a function is called in machine code, there's no such terminology in c++
Anonymous
Did you do a quick google search 🤣
No, I learned it in University :)
Spirit
Using x macros to generate an array of functions pointers and char * array.
I_Interface
Did you do a quick google search 🤣
this is the one of programmer's skill btw, google fast and impliment fast
Anonymous
I_Interface
aww, screen photo 😡
I_Interface
delete it
Anonymous
No problem.
Do you know what templates are?
Anonymous
Yes I know.
Do you know how to declare a function template? And what it is for?
Anonymous
Do you want to see a simple demo
Anonymous
No
Anonymous
#include <iostream> #include <typeinfo> int main() { // Type alias using T = char; // Array size constexpr size_t array_size = 10; // Declaring an array T array[array_size]; // Declaring a pointer T* pointer; std::cout << "Array size: " << sizeof(array) << "\n"; // 10 = array_size * sizeof(T) std::cout << "Pointer size: " << sizeof(pointer) << "\n\n"; // sizeof(void*) std::cout << "typeof(array): " << typeid(array).name() << "\n"; // char[10] = T[array_size] std::cout << "typeof(pointer): " << typeid(pointer).name() << "\n\n"; return 0; }
Anonymous
Console output: Array size: 10 Pointer size: 4 typeof(array): char [10] typeof(pointer): char *
Anonymous
Is it convincing enough?
Anonymous
But the point will be the same, only the representation differs
Anonymous
@k_vark, @bi_kash, what do you think?
Anonymous
http://thats-a.link/77BLnXt.png
Anonymous
Somehow breakpoints ain't working
Anonymous
Windows
Anonymous
I'm using CMAKE
I_Interface
Windows
use visual studio
Anonymous
And http://thats-a.link/8LnjyYV.png
Anonymous
Do you need visual studio to debug?
Anonymous
Wut
I_Interface
Do you need visual studio to debug?
nope, but it has more options for that
Anonymous
i'm wondering why its not working
Anonymous
Visual Studio Code isn't an IDE
Anonymous
You need IDE to debug
I_Interface
Danya is right
Anonymous
Why dous debug work fine for like java lol
Anonymous
And a few other langs
Anonymous
Anonymous
Whoops fixed that
Anonymous
I somehow had it set to release mode...
Anonymous
http://thats-a.link/4bPUDJt.png
Anonymous
It compiles fine but vscode is bitching about that header
Anonymous
then why does char * const ptr = array ; doesn't complain?
Because arrays can be implicitly casted to pointers to a first element
Anonymous
visual studio dous not complain about it at all
Anonymous
Visual Studio Code isn't an IDE
Anonymous
It is a text editor
Anonymous
It doesn't have neither compiler nor debugger
olli
http://thats-a.link/77BLnXt.png
try switching to "CMake: Debug" instead of Release
Ludovic 'Archivist'
While using inline function can someone please tell me that whether the entire code in the function is substituted in place of the function call or whether a part of it is substituted
Since inline is unrelated to that, maybe maybe not. Inline is an advise for the linker meaning the function may be defined in multiple translation units.
ozxx
/opencv
Tom
#include<stdio.h> #include <stdlib.h> int main() { unsigned long int n,a; int i=1,f=-1,s=1,t=0,noe=0,nod=0,d,sum=0; scanf("%uld",&n); a=n; while(a>0) { d=a%10; if(d%2==0) { noe++; } else { sum=sum+d; nod++; } a=a/10; } if(noe>=nod) { while(t!=n) { t=f+s; printf("%d ",t); f=s; s=t; } } else { while(i<n) { printf("%d ",i); i=i+sum; } } return 0; }
Tom
Tom
This is the question
Tom
The given examples are working perfect.. Bt there are 8 hidden test cases
Death
He hasn't mentioned that count(even no.s) >= count(odd no.s)
Death
Check for digits in given number N
Death
If the count(even digits)>=count(odd digits)