Anshu
#include <iostream> using namespace std; class max{ private: int x; int y; public: void getdata(){ cout<<"Enter First Number"; cin>>x; cout<<"Enter Second Number"; cin>>y; } void printdata(){ cout<<"First Number"<<x; cout<<"Second Number"<<y; } friend int large(max m); }; int large(max m){ if(m.x>m.y) return m.x; else{ return m.y; } } void main(){ max m; m.getdata(); m.printdata(); cout<<"largest no. is="<<large(m); } Why i am getting error
Vitaliy ◀️TriΔng3l▶️
Is there an alternative?
Nameful
Is there an alternative?
C++ is getting modules (I think that what they're called?)
Anshu
why i am getting error pls help
Nameful
why i am getting error pls help
what's your error?
Anshu
max is ambigious
MᏫᎻᎯᎷᎷᎬᎠ
Nameful
Hmmm So we are gonna have to wait for epochs
Why do you want #import deprecated?
MᏫᎻᎯᎷᎷᎬᎠ
Nameful
I meant #include
Nameful
my apologies
MᏫᎻᎯᎷᎷᎬᎠ
Isn't that obvious already?!
MᏫᎻᎯᎷᎷᎬᎠ
The same reason why we are getting modules in C++20
MᏫᎻᎯᎷᎷᎬᎠ
+ Knowing there is a lot of trash codes which was written 30 years ago behind your backs doesn't make the programmer feel good
MᏫᎻᎯᎷᎷᎬᎠ
Compile time will be declined
Nameful
+ Knowing there is a lot of trash codes which was written 30 years ago behind your backs doesn't make the programmer feel good
yeah, but at the moment I doubt a single big library and/or application uses modules in C++
Anonymous
Its indicate same name as
Nameful
and there'll surely be people who don't want to switch
Anonymous
Base class and derived class
MᏫᎻᎯᎷᎷᎬᎠ
and there'll surely be people who don't want to switch
That's why epochs are the solution to this problem
MᏫᎻᎯᎷᎷᎬᎠ
Keep it modern while preserving backwards compatiblity
MᏫᎻᎯᎷᎷᎬᎠ
Without breaking any legacy
Nameful
what are epochs in C++?
MᏫᎻᎯᎷᎷᎬᎠ
I believe it will be the best thing happened to C++
Anonymous
Write a C program that accepts some integers from the user and find the highest value and the input position.
MᏫᎻᎯᎷᎷᎬᎠ
Aditya
hello everyone i have one doubt , i was trying to implement queue using two stack but i was getting an error can anyone help?
Aditya
https://github.com/adityasunny1189/DS-ASSIGNMENT-3rd-Sem-ISE/blob/master/Queue_using_two_stack.c
Aditya
Ok
Aditya
https://pastebin.com/KK4wfaLW
Aditya
i was trying to solve queue implementation using two stack
Aditya
i was getting segmentation error but my code is correct acording to me as i was unable to find any bug
MilkBeforeCereal
a blind guess would be ambiguous class
Aditya
segmentation fault
MilkBeforeCereal
don't use max as a class name
Francisco
MilkBeforeCereal
also depending on your compiler you probably want main() as int
Aditya
Yeah I have returned 0
Aditya
MilkBeforeCereal
There is no class in c
his code is in c++ and I'm pretty sure it's the problem
Anonymous
you could use struct's as classes in C :D
MilkBeforeCereal
But I have written it in c
and I wasn't talking to you :)
Anonymous
even more, you could make a max class in C with structs
MilkBeforeCereal
I'm just incapable of writing all my thoughts in one post and also because people hate long posts
MilkBeforeCereal
why
Anonymous
why not?
Pavel
Without breaking any legacy
Deprecation means later removing, and that means breaking legacy. If there's no intention to remove why mark as deprecated?
MᏫᎻᎯᎷᎷᎬᎠ
If they will exist in C++23 #include can totally removed from it, while keeping it at the same time in old codes
MᏫᎻᎯᎷᎷᎬᎠ
Without breaking any legacy
Anonymous
Can wxWidgets be installed in Visual Studio Code?
Pavel
If they will exist in C++23 #include can totally removed from it, while keeping it at the same time in old codes
Ok, but how it going to work with libraries that still have headers? There are lots of libraries that can't be updated that fast (and some of them even written in C). I mean how can #include be removed if we can't distinguish which header is ours and which is part of a library (maybe part of a library that we build from the sources)?
MᏫᎻᎯᎷᎷᎬᎠ
Imagine you are in a boundary which only modern code is valid and old/corrupted code isn't except the outer environment
MᏫᎻᎯᎷᎷᎬᎠ
klimi
What do you mean?
dan
#gcc9
Anonymous
Is it possible to program graphical interfaces in Visual Studio Code?
Anonymous
🤔🤔🤔
Anonymous
Is it possible to program graphical interfaces in Visual Studio Code?
Everything is possible, VS Code is just a code editor
Anonymous
My advice is to throw away VS Code and download Qt Creator
Anonymous
My advice is to throw away VS Code and download Qt Creator
the problem is that you have to pay if you want to create a private software
MilkBeforeCereal
try clang
MilkBeforeCereal
better code diagnostics imo
14•08
try clang
Can u share it DM
Anonymous
Can u share it DM
Lol, has Google banned you?
Anonymous