ideone

Hello!
Please, what is wrong here?
http://ideone.com/DTAAH5

Are all online compalers striking tody?
Many thanks!!!

The code that used to be there was deleted by the owner. Otherwise, it still works:

http://ideone.com/1LCdkT
Which owner?
Owner of ideone???

http://ideone.com/UYqFKK
I have switched it to secret.

Here it is:
http://ideone.com/UYqFKK

Now it shoudl be visible!
No the owner of the code. For example I will now delete the code at the link I posted
Do U see my link:
http://ideone.com/UYqFKK ???

What does one have to do to delete it like u did?
Last edited on
Well you have to create an account. Then any code you create with that account can be accessed in a page that contains "my codes". You can then decide to delete the code in that page or set it's visibility level
It IS in my codes!!! I DO have an account- that is why I ask!!!
Last edited on
This is the code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<iostream>
#include<string>

using namespace std;



struct car{
    int weight;
    string color;
};
    
int main()
{
  car car1={100, "red"};
  car car2={200, "blue"};
  car car3={300, "green"};

   car * pc1;
   pc1=&car1;
   cout<<pc1<<endl;
   cout<<&pc1<<endl;
   cout<<*pc1<<endl<<endl;
   cout<<(*pc1).weight<<" "<<pc1->color<<endl;
   cout<<(*pc2).weight<<" "<<pc2->color<<endl;
   cout<<(*pc3).weight<<" "<<pc3->color<<endl;


   
   return 0;
}
and this is the error

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
prog.cpp: In function ‘int main()’:
prog.cpp:23:8: error: cannot bind ‘std::ostream {aka std::basic_ostream<char>}’ lvalue to ‘std::basic_ostream<char>&&’
 cout<<*pc1<<endl<<endl;
        ^
In file included from /usr/include/c++/4.8/iostream:39:0,
                 from prog.cpp:1:
/usr/include/c++/4.8/ostream:602:5: error:   initializing argument 1 of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = car]’
     operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
     ^
prog.cpp:25:9: error: ‘pc2’ was not declared in this scope
 cout<<(*pc2).weight<<" "<<pc2->color<<endl;
         ^
prog.cpp:26:9: error: ‘pc3’ was not declared in this scope
 cout<<(*pc3).weight<<" "<<pc3->color<<endl;
         ^

There s sth wrong with ALL the online c++ compilers I try today. And the error is the same.
There is nothing wrong with the online compiler, you just didn't tell the program how to print a car object. Your code fixed:

ideone:
http://ideone.com/mOCVAu

coliru:
http://coliru.stacked-crooked.com/a/81dd57dae2d330b6
O, shit!

Sorry smach- and thans!!!
Btw- U did not tel lme how u delted the content of yr link?;) (each stupid q can have sth usefull as adverse effect:d)
my codes -> select the code -> press trash can button
U confused me cause it was sth like template on lr link...
Topic archived. No new replies allowed.