| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12
Comments:
<0> don't know, I don't do MFC stuff <1> so how u would be doing it ? <0> why would I want to do this? "get stuff from user into an array, and display it back" <1> well the whole thing is the use of GUI <1> not what it does. <2> heh, eric clapton for music when on hold, interesting <3> this channel doesn't care about black people <4> Huh... Right. <5> uh <5> this is a programming channel, moron <4> That's why we always ask people about the color of their skin before answering them. <3> then how come no one here is celebrating martin luther king day, regardless of what channel this is <5> why should I be celebrating? <3> cause MLK is a damn ICON!
<4> What's Martin Luther King Day? <6> MLKDay on #C++ #xxxp***wordz <5> do you celebrate hannuhak? <6> At least we know how you're celebrating <5> chanukah <5> whatever <5> if you don't, i guess you hate jews <3> rdragon: dont turn this on to me <3> we're specifically talking about whites who don't care about black people <5> no we're not, only you are <6> I guess I hate. <5> heh <5> anyway, I am celebrating: I don't have cl***es today <6> I'm working from home. <6> Oh, wait... <6> Never mind. <5> hehe <5> how do you like working from home? <7> your office 'looks' like home? <6> I dig it. <6> I get to watch the squirrels cavorting in the back yard, I can make coffee that doesn't taste like swill, I can have a tasty snack without having to bang on a machine. <6> And I don't get interrupted. <8> 'C++ And Related Development <8> wat is # <8> ? <9> remoteint: wtf? <10> new to IRC possibly <10> or new to trolling <0> I thought I'd banned that ***hole the last time he made that comment <5> i think the ban list is near-full, he may have gotten shuffled around <0> MY ban list <9> he's come back as a different ***hole <5> ah <9> like reincarnation <0> looks like he got disconnected the same time I did <11> Hi, Say I have a 2d grid (with integer positions i.e. x = 0,1,2.. y=0,1,2...) and I have objects that sit on that grid (only one per co-ordinate pair). I want a container to store these objects and then quickly check the neighbouring locations. I was thinking I should use a map sorting on x and y but I'm not sure how <11> say I have struct pos { int x; int y } <11> std::map<pos,object> mygrid; <11> ? <5> a map? why not use a 2d structure like a vector of vectors, or boost::multi_array <5> is this, by chance, a tile-based game? <11> yes maybe I'm looking at the wrong kind of container <11> not quite.. it's a block construction program <11> where you put together a bigger objects with sub blocks <5> tetris ? <11> but you can only connect some bits together on certain edges <11> More of a design tool based on component blocks <11> you could make tetris like shapes I guess :P <11> If I have a vector of vectors then in the worst case (e.g. a line along one axis) I'll have one vector per block right? <5> well, a 2d-array sort of structure would do nice, I believe... unless these grids are abnormally large or something <11> and the best case I'll have one vector for all blocks? <5> one vector per block? no... one vector per row <5> plus one <11> yes but if they're all in one row then I'll have one vector <12> for a really big, really sparse grid.
<11> if they're in the perpendicular row I'll have lots of vectors with one block in easily <5> Solamente - yeah, I figured if it had to be like a sparse array a map might do ok <5> AxeMan - what? <6> For any reasonable size, a 2d vector is better. <5> vector< vector< Tile > > grid; <13> is it guaranteed by the standard that predicates for STL algorithms are not required to have default constructors ? Would STL implementation of find_if which constructs a predicate with a default constructor be standard confirming? Is this stated anywhere in the standard? <11> but if I define the < operator for my position cl*** then I can use a map seamlesly <11> so I could have std::map<posCl***,objects> <5> AxeMan if you're stuck on your solution, then what do you want from us here? <11> and then I can easily extend it to 3D by using a 3d pos Object <5> vector<vector<vector<Tile> > > grid_3d; <11> I wasn't sure if maps or vectors were the way to go <11> for quickly finding the neighbouring cells <5> specifically for that operations, vectors for sure <5> operation <5> grid[y][x] grid[y-1][x-1] ... <11> ah I'm not really giving you a piece of information that's critical... sparsely populated and construction in real time <5> how big is it? <5> a million rows by a million columns? <11> worst case is going to be probably 100x100 <5> then what's the problem? <5> that's virtually tiny <11> so I can get away with a vector with null pointers to the object <11> okay sounds reasonable :) <11> sorry not very experience with the STL so I'm trying to figure out when to use what <5> maybe you need a C++ then <5> er, C++ book <11> mm I'm ready The C++ Standard Library <11> *reading <11> It's more a design consideration <5> no, that's an implementation consideration <11> sorry I mean that by design consideration <5> your design is a grid no matter what <11> For the simple 1D case... if I have a block at 0 and a block at 99 then I have to have 1..98 as null? then I could go if(line[1]!=0) { // Check Neighbour } <14> guys is there a direct way to use C++ string member functions doing case _insensitvie_ operations ? <14> I've found a way to write my own char_traits<char> methods .. but is there a more direct way <13> Darwish: can you use boost string algorithms? Why do you need member functions? <0> Darwish why would you want a case insensitive string? <14> no, doing case insensetive operations with funcs like string::find () and so on .. <0> Meyers discusses that at length and concludes that it should be left to the compare functions <0> NOT as a part of the string <14> vawjrwrk, u mean write my own outside compare functions .. ? <0> Darwish well the "inside" ones don't ask for a comparison criteria <0> and he suggests that doing basic_string<char, yourchartraits<char> > leads to complications <14> mm, and where do these compare funcs exist ?? <5> in the ether <0> global functions <14> mm, and how to let a function like find () search in insinsitive way ? <0> you don't <0> why do you think it would be useful? <14> Actually Iam just solving some exercises from Thinking in C++ vol2 (not homework) <14> !voll <14> vawjrwrk, what do u mean by voll ? <0> volume 1 <0> and it's not voll, it's vol1 <14> Books are always argumentative subject .. thoug books like effictive, exceptional C++ no one can deny them <0> http://rudbek.com/books.html <0> I like all of those <14> Iam just a newb .. They are in my plans .. Espicially I am goin to write a real project soon <0> so what does Bruce want you to do that you think making string::finc() work w/ case insensitivity will help <15> Darwish like a clock <15> With nice professional looking arms ticking in sync with the computer clock <14> His questions is dummy anyway .. <14> But the book itself has moved me from a newb to somehow more advanced level <0> IMO, AC++ would have done much better
Return to
#c++ or Go to some related
logs:
#AllNiteCafe fruitylook widely considered to be man's first celestial observatory hi-lithium weird al caps lock #london what does the statue of liberty wear on her feet?
#AllNiteCafe #chatzone #chatzone
|
|