« first day (644 days earlier)      last day (4306 days later) » 

12:00 AM
repcap reset in < 1 min...
 
@Mysticial Shoot -- too late.
@Mysticial My reply to this one:
0
Q: simple hello world with C++ in eclipse Juno

ewokI am attempting to use eclipse for programming in C++. I have downloaded eclipse Juno from here. I have created a C++ project and a c++ source file (test.cpp) and added the following code: #include <iostream> using namespace std; int main() { cout << "hello" << endl; ...

 
lol
haha love the Java bashing
 
@Mysticial Now I ask you: how could anybody think that wasn't helpful? :-)
 
oooh.. end of the day downvotes... that sucks.
 
@DeadMG You say that like any feature is automatically negative by default.
 
12:03 AM
Actually, it wouldn't have mattered, you would've barely capped even without the downvotes.
 
@EtiennedeMartel It is.
 
@Mysticial Yeah -- and got an upvote that would have fixed it, like 30 seconds after the roll-over. Oh well.
@Mysticial Yes, but I wouldn't have a score ending in 6.
 
features cost development time, they introduce bugs, etc.
lowering the number of features in a game is just the same as DRY, YAGNI, and all the rest, which lower the amount of code you write in a program.
 
@JerryCoffin Was kinda waiting for that repcap reset. I'm trying to complete a 30-day repcap streak. And weekends are slow, so I actually need to answer a few questions today and tomorrow to continue the streak.
 
you want the absolute minimum number of features which produce a good result.
 
12:09 AM
I'm amused that I called the C room "lounge" at the request of a user who wanted to make the room popular and market it, who I never saw in the room ever again, but have seen in this room almost daily.
 
who'd want to go to the C Lounge when I'm in the C++ lounge?
 
Ell
@deadmg because you're in the c++ lounge ;)
 
@DeadMG beats me
@Ell that didn't quite make sense.
 
Ell
I was insinuating that because he's in the c++ lounge he won't be in the c lounge which would be a reason to go there, to avoiding being in the same room as deadmg
 
yeah, I got that, but it didn't quite comprende.
since I said "Who?" and you answered with a why.
 
Ell
12:12 AM
oops yeah just realised
hmm maybe I should sleep
 
This was the most aggravating problem I've seen for a while. It was very misleading: stackoverflow.com/questions/11588085/…
 
@MooingDuck you're stuck with netbeans too?
or was that someone else?
 
Ell
@deadmg how long have you been chatting with regulars here?
 
hello
 
@Ell Since I joined the chat, which you can check my profile to determine what date.
 
Ell
12:25 AM
@johnsmith hello there
gnight all
 
@DeadMG C programmers?
 
@EtiennedeMartel I'm a C programmer. And I've never been in the C Lounge. :)
 
12:44 AM
@chris nice
 
@Mysticial Im python (primarily) and i hang out here more then the python lounge haha
 
@Mysticial C Lounge is always dead.
 
So, with that new room description, can we finally add the c++2x tag?
Wait, what do we call the standard that's coming sometime before 2020? C++0x2?
1x2*
 
Xeo
12:59 AM
C++1y
most likely being C++17
and the one after that being C++22, most likely
 
17 now? I was hoping for 16 :(
 
So we'll get the boobs operator in C++17?
:P
 
Xeo
If we can get Bjarne to include overloadable whitespace after all
 
Yes, please. It'll bring in a lot of new programmers.
 
during the last 35 hours I've been working 32, fucking shithardware to blow up and bring down.. pretty much everything
 
1:01 AM
All my friends will be like "Oh, you're so cool programming boobs! How do I do it?"
 
and when I say "blow up" I mean that literally, it blew up
 
@refp ouch >.>
@refp what caused it?
 
Next time you hear grinding noises, turn it off. Seriously, though, that really sucks.
 
and I'm only supposed to be here part-time (50%) (ordered sick leave from my doctor, who want's me to get off work completely until I get my sleeping habits in order.. "you will die when you are 25 if you continue like this"), and I don't even get any extra cash/credit/thanks for this..
I'm just supposed to "fucking fix things"
 
quit your job
if your doctor says "get off work", then get the fuck off work.
and if your bosses can't cope with it, then that's their problem.
 
1:04 AM
my boss just turned in her resignation, and I'll probably do the same thing.. the people above us are handling the current events like little children would (closing their eyes and pretending nothing is going on)
 
I hate how people expect you to know the problem with no information or time.
And think you can work miracles on computers.
 
I work for what used to be the biggest commercial radio company in Sweden, though after a few events about 40% of our FM frequencies was sold to our only and therefore biggest competitor, they cut down a lot over here.. got rid of a lot of people (no technicians though)
@chris our firewall broke down (that's the node who blew up), it turned off about 50% of our server-room (thankfully our FM transmitters are on a completely different net (both in terms of IP and power)
 
Wow, that's a nightmare right there.
 
we have been wanting to buy backups of pretty much all our equipment if something like this happens, though we didnt get to because "it would cost too much and things like that never happen"
all our routing/security was on that machine, we had backups but heck.. what use are they when we don't have the appropriate hardware
so I decided to just snatch a server from the web department, turning it into a gateway as fast as I could.. (thank you perl, you saved me a lot of time not having to write all iptable-bullshit by myself.. I just wrote myself a quite simple piece of script to aid me in my quest)
we also had to reconnect the nodes who went down since the powersupply got itself quite a knock-out during the event (it switched to the back-up power, but many circuits were quite bad at the time so I didn't trust it very much.. and when it comes to broadcasting, well.. you need to trust your equipment)
so it's a fucking mess in there right now, I had a few electricians here earlier today who did an amazing job fixing the faulty circuits, now it's 03:10 am and I'm waiting for a few jobs to finish before I restore the power-connectivity (ie. replug everything back to where it's supposed to be)
which will make everything go silent for about 2-3 minutes if I do things in the correct order, but heck.. I ain't got no choice, and it's a friday night so who cares
 
just quit your job as soon as possible
 
1:13 AM
IT people are supposed to be the ones lying back with their feet on the desk all day; this isn't right.
At least that's how all the IT people related to my life are.
 
@DeadMG I'm about to, just waiting for my model agency to give me some sort of security so I can move abroad
 
you're a model?
 
yes
 
nice
 
(a male model, don't get too excited about it - there are no girls on the internet etc etc)
 
1:14 AM
yeah, I got that :P
besides
it's the other Loungers like sehe who are always like AMAGAD GURL
and I'm always like "dude, wtf"
 
I've never seen anyone got to excited about @cicada though
just had to write that, I have a little beef with that girl
 
she's
difficult to reason with sometimes
 
or maybe.. that's not her nick? is it cicada? cicida? cuntifia?
true that
 
lol
cicada
 
well, I better get cracking in the server room, see ya later
 
1:17 AM
bb hf
 
1:31 AM
i think my favorite thing about web development is being able to relax and work in photoshop when im tired of dealing with layouts >.>
 
I'm the unemployeds.
 
well, its only a random job i got picked up for.
 
aaaargh
y people design website where middle click cannot open in new tab? :(((
 
I like the alert software I wrote to see the status of all our machines (not only in the server room but also the workstations at our floor), my screen was cluttered with alerts, and when the bubbles starts fading away.. well, it looked nice
@DeadMG because people are kinda stupid, that's why
write a plugin which hooks the current status of the page you are viewing, upon middle click it just forks (ie. duplicates the process information) and displays it in a new tab, then switch to that new tab and either evaluate the on-click-event in the first or second (preferrably the second, but it might be easier to just do it in the first one and then change the order of second and first to make it look like the first tab is a new tab opened)
 
I could get a job a lot easier if I'd graduated, of course.
 
1:42 AM
0
A: How to drive C#, C++ or Java compiler to compute 1+2+3+...+1000?

Carl WalshI feel obligated to give this C code, since nobody else has yet: #include <stdio.h> int main() { int x = 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+32+33+34+35+36+37+38+39+40+ 41+42+43+44+45+46+47+48+49+50+51+52+53+54+55+56...

^^ uh...
 
the thing about learning things in school is that you could learn the same thing at a shiftjob and then advance you knowledge by working, when I compare my salary to those who are still studying (I dropped out, mostly because of modeling) I don't find it worth staying in school
sure, the first job is the hardest to get.. but after that it's just a matter of playing your cards right so that you can advance to a better job
 
@refp Well, I mainly found that the skills required to graduate were not just orthogonal, but the complete opposite of the skills I was striving to gain to become a good software engineer.
 
work experience vs diploma, according to me I'd prefer someone with experience over someone who just spent 4-5 years at a university
 
yeah
hard to get experience without degree, though
 
yeah, the first job is the hardest to get - my advice is to just push on the fact that you know that you know certain things, and be happy to provide them with a solution to some sort of problem to prove the fact
 
1:48 AM
yeah
 
I applied for a job where they were looking for someone with at least 5 years of work experience, or diploma + 1 year.. I was the youngest to apply (17 at the time), and they told me after working there for about a year that they only answered my emails because they thought they'd have a laugh at the office
 
lol
 
they gave me a problem to solve (which I later found out was a real problem they had, and the code I sent actually got pushed out in production mode shortly after)
I should have sued them though.. they had no right using that code! ;-)
 
@Mysticial in python its as easy as: sum(x for x in 1001)
lol
 
@ITNinja Runtime, not compiletime.
 
1:52 AM
@DeadMG oh my bad :P
 
2:02 AM
I'm having trouble understanding exactly what the following syntax means:

>class a_class{...stuff goes here...};
>a_class::a_class(string L){some stuff here}
I guess more specifically, what is a_class::a_class?
 
@NicoBellic a_class::a_class(string L) is a function that is part of a_class
it is a constructor.
 
Ahhhh. So does that mean that you can instead write that inside the class?
as in:
>class a_class{
>a_class(string L){}
>};
Are these equivalent?
 
basically whenever you use the class (like a_class yourvariable; ) a_class::a_class() is called
 
You mean a_class(yourvariable)?
 
@NicoBellic Somewhat.
 
2:07 AM
@DeadMG what's the difference?
 
well
for example, you have to include the headers that describe the stuff you use in the implementation in the header for the class, which is generally not good.
but on the other hand, it can be a template and not be a problem.
 
I see. So
>class a_class{
>public:
> a_class(string L);
>};
>a_class::a_class(string L){some stuff here}
Is pretty much the same as just putting a_class::a_class(string L) inside the class?
 
@NicoBellic, :: is the scope resolution operator; it tells the compiler where to look. For example, you can access static members of a class via a_class::theMember. In this case, it's used to tell which function to define. If you don't put it there, it will try to make a totally new function if I'm correct.
Inside the class already has that level of scope, so the a_class:: part is not required.
 
@ITNinja easier to (n/2)*(n+1)?
 
2:32 AM
and suddenly, all goes quiet o.o
 
what is it with haskell? bananas, and now boobs. hm.
 
@Cheersandhth.-Alf Clearly you missed this:
Go back to the first revision
 
Voted to undelete and to reopen just because I hate the noses of the downvoters and deletevoters.
 
lol
 
it should be both downvoted and deleted.
it's a stupid question with no value to anyone, anywhere, ever
 
2:49 AM
It brightened up my day, though. I really wish those questions had somewhere to go.
 
@DeadMG you narrow minded thing. what if the persons' manager has required a "meaningful" boobs operator? perhaps as a kind of contest? we don't know. it's a legitimate question, and the fact that some are too stupid to be able to think of a good answer, doesn't mean it should be closed and deleted. on the contrary!
 
@chris Same. Bad question, very arguably not suitable for the site. But it was entertaining while it lasted.
 
@Cheersandhth.-Alf, The OP mentioned he just wanted it in C++ for no important reason.
 
So? Most probably he lied about that. Anyway, you don't know that someone in the future won't have an urgent need for an answer to that question. Once asked, questions tend to be re-asked! Perhaps in interview question. Who knows.
 
Xeo
@Mysticial Screw the last edit
 
2:53 AM
@Cheersandhth.-Alf Here's the first round of comments that got nuked:
10 hours ago, by R. Martinho Fernandes
@Mysticial Ok, there you go: http://i.stack.imgur.com/RPloh.png
 
If that was an interview question, tell me where that was, so I can go apply.
 
Xeo
@Mysticial There, fixed in latest revision :D
 
@Xeo haha awesome
 
Xeo
Too bad simple rollback didn't work
 
He he, there was a stupid troll pretending to be a stupid female! LOL
 
Xeo
2:55 AM
I think I'll put a random // boobies! comment somewhere in the source of the project I'm working on, just for the heck of it.
 
You don't want to know what I misread BoltClock's name as the first time I saw it while we were on the subject.
 
@chris Bolt Cock?
 
@Xeo, Or you can do what MS did and "encode" it in hex.
@Mysticial, A bit more off than that, sadly.
 
Sorry if I'm interrupting, but I'm reading about recursion so I've tried to practice a bit with a binary search tree. I'm not trying to make anything too fancy, I just wanna start off with building a basic one: pretty much just create a node with a value, and if that value has already been entered, skip the value and print out "already entered". What would be a simple way to do that?
 
@chris you're thinking of the XOR thing hiding the "Novell DOS sucks!" thing?
 
Xeo
2:58 AM
@Cheersandhth.-Alf 0xB16B00B5
 
@Cheersandhth.-Alf, Today/yesterday the code 0xB16B00B5 was found in linux kernel code or something.
 
oh, deadbeef thing
sure
@NicoBellic starting with recursion i recommend a graphical approach. generate a fractal tree. C curve and Dragon curve. that sort of thing. it's more fun too! :-)
 
@NicoBellic With recursion.
 
@Cheersandhth.-Alf Oh haha I'm afraid I wouldn't be able to do that. I'm pretty new at all this.
 
but -- it's simpler than what you suggested?
of course you need some graphics output to do it
in Windows it's fun to draw directly on the screen, just bypassing windowing etc.
 
3:02 AM
@DeadMG Yeah. I already have a leftchild, rightchild structure to check when they are NULL and if so to recursively add the value. I'm just not sure how to check if it has already been entered anywhere in the tree.
 
not sure if that works in Windows 7 though
 
@Cheersandhth.-Alf, I'll check, one second.
 
@Cheersandhth.-Alf but I'm actually not sure I'm familiar at all with any graphical thing?
 
@Cheersandhth.-Alf, Works with GetDC (nullptr) and Rectangle.
Of course you can have your own invisible, topmost window too.
 
3:06 AM
I'm so confused right now. What are all of these?
 
The thing I hate about that is that the taskbar won't step down for that, only when it's active, which it won't be if you want to keep the drawing there while you do other stuff.
@NicoBellic, It's the Windows API. It's a lot of fun.
I think that's the main reason I really started to love programming.
Just made something to scroll chrome without activating it so I can read stuff while I do something in a window beside it. Once you know how to make things, you start getting a lot of use out of your skills.
 
@chris That's actually really cool. I haven't gotten into any of that though. Since I picked up a C++ book about a month ago I've just been doing terminal work and learning bit by bit.
 
@NicoBellic, I started it myself after a year in class. This site worked well for me to start learning, and understanding came bit by bit afterwards.
 
@NicoBellic Perhaps using recursion.
 
Here's what the freehand thing I made a long time ago looked like: i56.tinypic.com/24g6d5l.jpg. Good times, I have to remake that and make it decent.
 
3:14 AM
@chris haha this is strange http://i.imgur.com/VtDCg.png
@DeadMG Yeah I guessed so. I'll give it a shot, if I have any syntax questions/problems I'll drop a message.
 
@NicoBellic, Like I said, a long time ago. Here it is: i.imgur.com/F2HBm.jpg
 
So the face was drawn using the windows API?
Hah I have no idea what I just asked.
 
@NicoBellic, It was something that let me switch into a mode where it would paint (circle brush) like MSPaint, except on the screen. You could change the colour and size up to that point.
 
Ohhhhhh nice.
What does this-> mean?
 
The main problem I faced with that was both capturing the mouse messages coming through (you could have a window with 1/255 transparency to be invisible, but react to the mouse) and displaying the image (1/255 transparency makes the image invisible). Someone helped me realize that I could use one window for mouse messages and another to draw on (with an opacity mask, anywhere not coloured (1,1,1) or w/e is shown, and (1,1,1) is transparent).
 
3:22 AM
I'm reading it off this wikipedia code:

bool BinarySearchTree::search(int val)
{
Node *next = this->root();

while (next != NULL) {
if (val == next->value()) {
return true;
} else if (val < next->value()) {
next = next->left();
} else {
next = next->right();
}
}

//not found
return false;
}
 
this is a pointer to the current object.
Pointers access what other variables do with the dot operator via the arrow, which is equivalent to (*object).something();
That's equivalent to object->something()
Or if object isn't a pointer, simply, object.something().
 
Yeah, I knew that part. What do you mean by current object?
 
If you're inside a class function, there must be some object associated that you're calling that function on.
 
Right right right yeah makes sense
 
this is a pointer to that object, so if you say obj.foo(), this inside foo() will be &obj.
 
3:25 AM
Yep gotchu.
 
It's actually the case that all (non-static) member functions have this passed in as the first argument implicitly.
When you access a member inside of it, like bar = 5;, it's translated to this->bar = 5; with the help of that argument.
 
`Node *next = this
`Node* next = this
 
you need to l2 markdown
cause that's unreadable for me
 
Use backticks for code (left of the 1 key).
should be `
 
Does that work?
 
3:29 AM
And you have to surround the code in them.
But no, both of those are the same.
 
Ah...alright. That single part has been throwing me off on a lot of occasions.
 
Some will argue that the first is better due to stuff like int i, *j, k;. Some will argue the second because it's a pointer to Node, so it should be with the Node.
 
I like the second version too. I've seen the first one way too many times though, and I've gotten confused every single time.
 
it's generally a C or C++ programmer thing.
C programmers tend to prefer Node *next, and C++ programmers tend to prefer Node* next.
 
I always liked the former, and I never really did C.
 
3:34 AM
it's just a trend, not a hard-and-fast rule
but notably, in C it was very common to declare multiple variables in one line because in C89 you could not mix declarations and statements
 
It's like writing, though. If you complain that someone's handwriting is not exactly like yours, so you won't read it, you'll be screwed.
 
however, since in C99 and C++ it's perfectly legal to do this, most people prefer to declare variables as late as possible, and it's not very common at all to see multiple-variable definitions.
 
3:49 AM
0
Q: the result is very different between siege and webbench

solomon_wzsi use siege and webbench to test my server, but the result is very different $ webbench -c 100 -t 10 url the result is about 600 trans/sec $siege -c 100 -t 10s url the result is about 200 trans/sec why the result is very different?

Close, serverfault, or superuser?
 
serverfault
 
Ok sorry took a short break. Ok I just wrote a really simple function to add nodes. It looks a bit like this:

tree_class(string value);
void add_node(string value){
if (left_child == NULL){
left_child = new tree_class(string value);
}else if (right_child == NULL){
right_child = new tree_class(string value);
}
}
 
You probably just want new tree_class(value).
 
How would that assign the new node to the left or right child though?
 
no
 
4:02 AM
@DeadMG really? Wow, what am I doing wrong?
 
no new. that's only gonna make life worse.
 
I was just commenting on the string value being incorrect syntax for calling it.
 
if you're gonna mess with dynamic memory you must know smart pointers.
@chris Oh yeah, that's wrong too
 
@chris ah good call.
 
by the way, you're not using namespace std; are you?
because that's also the bads
 
4:03 AM
Boobs operator eh
 
well above I did do:

tree_class* left_child;
tree_class* right_child;
@DeadMG I am. How come it's bad?
 
because basically, there's absolutely no reason to do it, and you will end up with a bunch of extremely confusing problems later when the names from std conflict with your own.
 
So I should just keep it to std::string for example?
 
yes
 
Yeah, it starts sucking when you manage to have it call a std function instead of yours.
And you can't figure out why your function isn't working.
 
4:07 AM
Alright. Back to the recursion. What am I doing wrong above?
 
base case is base case is base case is base case ...
 
@LeandroArielPezzente so it's going to be stuck on the first node?
 
user406009
@NicoBellic It will if the pointers are initialized to null.
 
your whole ownership is also completely messed up
 
@EthanSteinberg well left_child and right_child are initialized to null yeah. And they are the pointers. I'm getting kinda confused here.
 
4:12 AM
you need to separate the class which represents a tree, and the class which represents one single node in that tree.
 
Let me try.
 
06:15 am, time to head home..
 
user406009
Oops my bad, didn't notice the function heading for add_node. I thought that code was in the constructor.
 
I ignored the issue of balancing the tree, but this is otherwise good.
 
Agreed.
 
4:22 AM
Oh. I was just about to paste what I had pastebin.com/ZkATyuK6
 
FUCK!
 
Your nodes shoudl be the ones with left and right pointers, should they not?
I never really got into trees or anything, maybe I should.
 
defined the order of rules to iptables wrong, just locked myself out of a server on the fourth floor, and I'm at 8th.. well, there is an elevator but still
 
user406009
@DeadMG Just wondering, why the static function as a design instead of a constructor?
 
I wanna get the fuck home
 
4:25 AM
@EthanSteinberg It has a constructor too?
the whole point of the static function is that sometimes you need the constructor, sometimes you need the function, and that logic is totally re-usable.
 
@DeadMG holy crap I think I'm too tired for this. I'm not sure I'm able to follow your code.
 
byebyebye.
 
@NicoBellic Pretty simple, really.
 
@NicoBellic, If it's the unique_ptr, it's just a pointer that frees the memory when it goes out of scope.
Much more useful than raw pointers.
 
first, forget all the new and the unique_ptr and the make_unique. All it means is "I make this dynamically, and it will be automagically released for me whenever necessary, so I never have to worry about it."
kinda like new but delete is magicked in for you.
that's it.
well, that's a supremely great thing which should always be done, but it doesn't affect the core of the structure.
 
4:28 AM
@DeadMG can you maybe explain it to me through my code (As in what I've done wrong etc)? I think I'll be better able to follow that way.
 
well, for one, the Node class itself needs the lhs and rhs pointers.
your tree can only ever hold two nodes, lols.
 
@DeadMG yeah dammit.
I can't...what am I missing here how do I recursively produce more nodes?
 
well, you hold a pointer to a node.
that pointer may or not actually point to another node.
but if it does, that other node also has left and right pointers.
 
OOOOhhh right right. Wait what's the syntax for that?
 
just put the left and right pointers in the Node class and you're done.
oh, wait
the pointers should point to other Node, not other tree_class.
nodes point to more nodes, not more trees.
so your recursion is defined as simply as "Each Node holds two pointers to more Nodes."
 
4:33 AM
Ahhhhh. There we go.
 
now your addnode is totally broken
the choice between lhs and rhs is based on whether or not the value compares less than
you know your binary tree is broken if < does not appear.
 
Yeah that makes sense. The value of the string right? As in alphabetically?
 
eh
that's operator<'s job, not yours.
 
yeah true.
 
then when you have chosen lhs or rhs, you simply create the node (with that value) if it does not exist, else, you ask it to make that decision again.
 
4:35 AM
Sorry, I'm getting really tired at this point. What would the syntax be in this case?
 
for what?
 
for the <. Where would I implement it?
 
you don't implement <, you just call it.
like string1 < string2.
 
That's what I meant.
I mean how would I compare the two nodes?
 
you don't compare two nodes. You compare the values they contain.
 
4:37 AM
BTW thanks for answering at this hour (12:30 am around my time)
 
heh
lesson: pretty much everyone here is in the EU. For me it's 05:38.
 
a.m.?
 
05 is in 24h format.
 
Ahhh.
wow
Man, that's...that's something.
 
not really
right now I wake at 6pm and sleep at about 9am or so.
 
4:39 AM
Heh nightowl
Do you work at night or something?
 
nah
just sickness
 
Oh I see.
 
start with a somewhat normal cycle- 11am->1am, say.
then become very sick and unable to sleep for five hours at 1am.
then wake up at 6pm when you sleep at 6am.
then the cycle continues from there.
 
sleep sickness?
 
nah
something with my stomach
ate something funky :P
 
4:42 AM
heh. well alright I hope it gets better.
and damn, i'm just staring at my monitor screen right now.
 
just go to bed
if you can't even pull the syntax for passing a function parameter, you won't grok an abstract data structure.
 
I have random people yelling outside.
 
That might very well be true actually. I'm just really curious as to where I'm getting confused.
I don't even know. :(
@chris that's always fun.
 
trust me: sleep.
 
yeah I'll be out in a bit.
I just don't get how you compare the nodes that's confusing me right now.
 
4:46 AM
you don't compare nodes.
you compare the value contained in the node, and the value you want to insert.
 
right right that's what I mean.
but what is there to compare.
if two children are empty, just add a new value to either child, right?
 
no
for a node N, if (value to insert < value in node) add to lhs, else add to rhs).
 
Ohhhh well why didn't you say it like that hehe
 
I showed you code which does exactly that :P
 
lol I'm sorry I'm dying right now.
but I'm also waiting for somebody to pick me up
and by zeus i wanna finish it before that person comes
haha
 
4:51 AM
lol
 
now one more question in the syntax, add to lhs should be done like this:

`left_child = new tree_class(string key);`

correct?
 
Without the string part, and with a smart pointer as soon as you get to learning about them.
 
skip string.
 
yes yes yes. I deleted it my code too but forgot it here
So that should do it?
 
paste the current version
 
4:55 AM
@chris what do you mean smart pointer?
 
@NicoBellic Smart pointers automatically free memory for you.
 
how are they used?
 
look at the code I wrote.
 
people no longer evaluate good answers, they evaluate big ones.
 
@NicoBellic, Remember std::unique_ptr? That's one.
 
4:56 AM
thank god it doesn't matter.
 
unique_ptr is an actual keyword that initializes smart pointers?
 
It's a type of smart pointer, along with std::shared_ptr and std::weak_ptr.
They're all classes in <memory>, IIRC.
 
@NicoBellic Library feature. Not keyword.
 
Here's the reference for unique_ptr: en.cppreference.com/w/cpp/memory/unique_ptr
 

« first day (644 days earlier)      last day (4306 days later) »