Anonymous
just to contextualize: https://docs.microsoft.com/en-us/windows/win32/api/wbemprov/nf-wbemprov-iwbemproviderinit-initialize
Anonymous
then nullptr is interpreted differently ?
Vlad
Anonymous
😂 right
Vlad
Nor in the C++ standards prior to C++11
Anonymous
many thanks!
V01D
There's no nullptr in C
Isnt a nullptr just (void*)0 ?
Parra
Parra
it's implementation dependant
V01D
I don't think so
It is NULL in C.
Parra
It is NULL in C.
in C it is, but again, not always
V01D
NULL in C++ is 0, so I thought that might be it. A zero casted to a void pointer
Z0OM
i have something like, union A { struct{ int i; } ; struct{ int j; }; } ; A *ptr = nullptr; if i want to achieve ptr->j. how to do it?
Z0OM
bro this is just sample code
Z0OM
why
Anonymous
Because they are stupid and error-prone
Z0OM
hmmm
Anonymous
Why do you need a union when there's std::variant?
Z0OM
ok let me read about it. i'll get back
Anonymous
Cool
Vlad
Also variant will get rid of that pain as Danya suggested.
I_Interface
NULL in C++ is nullptr.
NULL is 0, nullptr is nullptr.
Z0OM
so now i used variant but still unable to achieve my goal
Z0OM
struct A{ int i; } ; struct B{ int j; } ; std::variant<A, B> *ptr; now if i want ptr to have j as a member then how to do it? ptr = new B(); gives error
V01D
NULL in C++ is nullptr.
NULL and nullptr arent the same.. 🤔
Anonymous
BTW maybe you will be interested nullptr will appear in C2X standard
Z0OM
Why do you even use ptrs?
thats not necessary but i came upon this and wondered if there is a way. will use normal objects then🤷‍♂️
Mar!o
NULL is 0, nullptr is nullptr.
NULL is ((void*)0) in C but in C++ you should use nullptr because it's C++ not C
V01D
NULL is ((void*)0) in C but in C++ you should use nullptr because it's C++ not C
C++ has nullptr for, well pointers. They should only be used for pointers
Röhīt Ráthøर
Hlo anyone can send me all header files of c++ Window 10
Röhīt Ráthøर
64bit
Anonymous
Just download yourself
Dima
lol
Dima
download windows sdk
Nitesh
Can you guys please suggest me a good and easy to use IDE for C & C++ as a beginner?
Apurva
/notes
Nitesh
#ides
Henry
Henry
polar nights - good joke
Anonymous
#stop_teaching_c_as_cpp_preamble
V01D
Or use visual studio.
V01D
I love makefiles. Visualstudio does everything for you, makes spoiled progammers :(
Nitesh
VS Codium / atom
Thank you sir 😊
Anonymous
I heard about this video before
Merazi
Can you guys please suggest me a good and easy to use IDE for C & C++ as a beginner?
Here are some cool text editors: Atom VScode Notepad++ / Notepadqq Emacs or VIM if you want to invest some time learning them And some IDEs: Geany Netbeans Eclipse The intelliJ IDEs, some of them are paid only tho
V01D
Rip your eyes
Merazi
I have it configured the way I like
V01D
I cant see a thing with xterm
V01D
All my terminal does is clear ; make ;make clean 😂
Merazi
I cant see a thing with xterm
you just need to add some good fonts and colors
Anonymous
I love makefiles. Visualstudio does everything for you, makes spoiled progammers :(
Makefiles could be considered traditional only for Unix like systems I think. Also makefiles is almost turing complete, but still not portable to systems with different shells. You can find build systems with more reliable syntax and then cross platform, like meson
Anonymous
I cant see a thing with xterm
It is easily configurable with Xresources, you even can use xft fonts. So it’s not hard to make it look nice
Merazi
it runs smoothly on my potato pc
Anonymous
you just need to add some good fonts and colors
I suggest you to write comments in English even if it isn’t your native language
Anonymous
yes, and the footprint is really small
+ plus it’s part of base system distribution of X, but it’s all off topic, sorry for that
Merazi
+ plus it’s part of base system distribution of X, but it’s all off topic, sorry for that
yeah, it's a pretty neat peace of software that you can use if you have a linux box If anyone wants it DM me and I can send you my Xresources for xterm
Merazi
BTW, the program was for an assignment, besides the comments in Spanish. What other changes would you do to the code?
V01D
Plz can explain further to me
What don't you understand about it