Anonymous
Guys
Anonymous
✋✋✋✋✋
Anonymous
How are you doing
Ritu Raj
i'd love to eat more but i'm afraid of the walk to the fridge..............where are you?😢😢😢😢😢
Ritu Raj
i'd love to code more but i'm afraid to correct the code😑😑😑😑
BinaryByter
BinaryByter
it doesnt know that b has that function yet
Dima
welcome
Ritu Raj
then why it is working properly if i use
Ritu Raj
friend class B;
Ritu Raj
instead of friend void B::setdataofA(A&);
Dima
could try enemy class B;
Roxifλsz 🇱🇹
Ohama |
What is Hardware independent and Platform independent?
I will learn C programming
BinaryByter
Think about what the word "hardware independent" says
Dima
lol
g
I sent it by mistake
g
...
BinaryByter
i'm sorry, but thats kinda severe
klimi
Dima
what kind of pornography did he send?
Dima
I am curious
Anonymous
Ritu Raj
#include<iostream>
using namespace std;
class A;
class B;
class B
{
public:
void showdataofA(A&);
};
class A
{
int aa;
public:
void setdata(int aa)
{
this->aa=aa;
}
friend void B::showdataofA(A &a);
};
void B::showdataofA(A &a)
{
cout<<a.aa;
}
int main()
{
A obja;B objb;
obja.setdata(5);
objb.showdataofA(obja);
}
Ritu Raj
this code is working!
Ritu Raj
```
Mykyta
Сongratulation!
Ritu Raj
#include<iostream>
using namespace std;
class A;
class B;
class B
{
public:
void showdataofA(A&);
};
void B::showdataofA(A &a)
{
cout<<a.aa;
}
class A
{
int aa;
public:
void setdata(int aa)
{
this->aa=aa;
}
friend void B::showdataofA(A &a);
};
int main()
{
A obja;B objb;
obja.setdata(5);
objb.showdataofA(obja);
}
Ritu Raj
but this is not!!
Ritu Raj
i dont what is difference between them
BinaryByter
they are the same?
BinaryByter
can you point out the line where they differ?
BinaryByter
i'm too lazy to parse them
Ritu Raj
only difference i found is defination of void B::showdatofA(A &a); is in different place
klimi
Roses are red.
BinaryByter
BinaryByter
I see the difference, sorry
BinaryByter
i don't see why one wouldn't compile
Ritu Raj
plzz try to compile both @linuxer4fun
Ritu Raj
why one is working and other not??
Ritu Raj
plzz help!!!
BinaryByter
BinaryByter
a is not a full type yet
BinaryByter
the problem is not with your friend statement
BinaryByter
it doesn't know what a.aa is yet
BinaryByter
how could it?
Ritu Raj
ohk
Anonymous
Mykyta
public:
int aa;
I did this when I tried to fix this code, but class A has a friend function
Mykyta
In theory, it must work
The Dictator
Please help me in fixing this issue.
The Dictator
The Dictator
I have linked all required libraries but still I am getting this.
BinaryByter
Mykyta
Please, try to press "prt sc sysrq" button
Anonymous
Murod
The Dictator
Mykyta
Murod
The Dictator
I have linked all libraries required for glfw . My code was working fine on windows 10.
But its not working in Linux.
BinaryByter
BinaryByter
linu does not
BinaryByter
so the linking is fundamentally different
The Dictator
Yes I compiled all files from source again in Linux using cmake
Suraj
K
Anonymous
😭😭😭
Anonymous
Thanks
Anonymous
Mykyta
Well
Mykyta
abhi3700
Anyone using libXL library for excel using c++
abhi3700
??
abhi3700
C++ Excel Library to read/write xls/xlsx files - LibXL
http://www.libxl.com/home.html
Anonymous
Anonymous