@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10



Comments:

<0> Seems that soon I'll need a complete list of all chinese IP's too (next to korean)
<1> why?
<0> They send SO much spam my way that my /var/log partition runs full, not even mentioning the cpu it costs to filter it out.
<0> The only way to deal with it is by firewalling the ips
<1> your hostname is 127.0.0.1 :), how did you do that?
<0> I registered a domain that ends in .1 simple.
<2> hmmm, cute Run
<2> can I get a sub domain?
<1> never thought that domain names ended in numerals
<1> 0-9 ?
<1> one digit
<3> Hi....How to block scroll bar in MDI Form.?
<3> Hi....How to block scroll bar in MDI Form with c#.?
<2> in anything you prefer corstan
<1> .sdfdsfdfddfd ?
<3> Hi....How to block scroll bar in MDI Form with c#.?



<4> #1: this is not #C#. this is #C++.
<4> #2: Please don't repeat.
<4> #3: Please don't use colors.
<5> hi
<6> hey
<5> feel
<7> printf
<8> no
<9> case
<10> Heh cowmoo
<8> heh
<8> sup foo
<8> how's that new season of The Shield?
<8> I'm gonna watch the new episodes this weekend, so pumped
<11> crap. I can't finish FEAR
<11> that little girl gives me the creeps
<10> It's not as bad I thought it'd be without Glenn Close
<10> But it does tend to be a depressing show sometimes
<10> You need a good character around to center things
<10> Hopefully they'll bring one of the detectives up front or something
<8> MACKEY
<10> GAEY
<8> wtf
<8> wait by good do you mean sweet or do you mean non-evil
<10> non-evil
<8> real life ain' like that
<8> didn't the shield teach you anything fool
<10> Haha
<12> Q: Err this should be easy. I jusk ask this because I'm bore ;). If I have an array byte *arrA, can i create a new byte *arrB that point arrA starting from its Nth element upwards
<13> what do you think?
<13> a T* points to a T... can you make it point to a T that's in an array? of course, it's still a T
<13> it knows not that it's part of an 'array'
<12> so let say if i keep track or arrB size ... I can just read through the elemnt like an array right?
<13> 'read through the element like an array' ?
<13> I thought arrB WAS an array
<13> hypothetical programming problems are useless - lets see something real
<12> BMP files... the first 14 byte is header
<14> and why are you using dynamic arrays instead of std::vector?
<12> so arrA is bytes that I read from disk
<13> and...?
<12> and arrB is starting from bytes 14 and up
<14> and?
<13> "is starting" ?
<12> because I dont need the header
<13> char* a = ...; char* b = a + 14; // ?
<14> stream.ignore(14)
<12> ok... that loos like it
<12> stream.ignore(14) means?
<12> loos = looks
<12> <14> and why are you using dynamic arrays instead of std::vector? <----- I have been thinking about this... but I have to write dll that have function prorotype like getImage(byte *image)
<13> so?
<13> "have to" ?
<12> have to because other people make it standard that they will access my dll using this prototype
<13> and what does that have to do with preferring vectors over raw arrays?
<13> or rather, the other way around
<14> who is responsible for allocating the memory for the image?
<12> let say i change the prototype to getImage(std::vector<byte> image) .... can they still use the function without changing their code?
<14> no
<14> nevermind
<14> you have some old crap to deal with
<14> and one would hope it was std::vector<byte>&



<14> but back to my original quesiton, who is responsible for allocating the memory?
<12> <14> who is responsible for allocating the memory for the image? <--- at the moment they have to do this because my dll cant do this and throw the array across process boundry
<12> in fact I cant event resize the byte array
<12> ... this bother me a lot
<14> so you're taking it on faith tht they've made it big enough
<12> yeah... that might cause problem in the future ... for sure
<13> who are these 'people' ?
<13> and why aren't THEY using vectors?
<12> I really cant say... but this somekind of interoperatibility test
<12> so they take the lowest common dominator ... that is old win32 dll approach :P
<13> i don't want their names... i want to know their relationship to you
<12> but they are using C# 2005 for the test rig
<12> they -> Standard testing body
<12> I guess their reason for lowest common dominator sounds right
<12> If I use std::Vector then it should be easier as I can get the size right?
<13> is this your job?
<12> I should propse this for future perhaps
<12> yes!!!!
<13> what is your job title?
<12> Silly Programmer
<14> wow, you got a promotion from Silly Wabbit
<12> :D
<13> what kind of application are you working on?
<12> hmmm I have to read bmp file
<12> and that p*** this bmp file to another library for processing ... since I am a silly programmer ... that is all I have to do
<12> and then I can go back and play games all day
<15> Consider that in Windows, you can't allocate memory in one DLL and de-allocate it in another.
<15> This places serious constraints on the use of standard C++ containers in Windows programming.
<12> ok... that sounds like the problem I'm going to face
<13> those concerns go away when dealing with a shared library, right Solamente ?
<15> If shared library == DLL, then to my knowledge, no.
<13> not a DLL
<12> ... does that mean i'm going to face same problem even if I use std::vector
<13> a static library linked into the executable
<15> Right, that's not a problem.
<15> Dynamic libraries (loaded at initialization or at runtime) are where the problem occurs.
<13> aye
<12> <12> ... does that mean i'm going to face same problem even if I use std::vector <--?
<15> The concern is that you de-allocate on the same heap where the allocation occurs.
<12> problem means... I cant resize the array ...
<15> So, if you allocate it in a DLL, your de-allocation or re-allocation has to occur on the same healp.
<15> heap
<14> one presumes, but I haven't tested it, that you could resize the vector
<15> I don't believe so, not crossing a DLL boundary.
<14> do you can't hand a vector & to a dll and have it do push_back()s eh?
<14> very very ****ed design
<14> but then I've always thought that MS didn't really understand DLLs
<13> is that some kind of 'security' feature, or is it some technical organization that makes it impossible
<12> Application --> DLL Application allocate the array , DLL can use the array, add data etc. But DLL cannot allocate the array...?
<15> I'm googling for an article explaining the what and why.
<13> adding data potentially means deallocating the internal buffer and allocating a new one
<12> I can understand that when u say different heap, Application -> HeapX DLL -> HeapY
<12> by adding data I mean ***ign data to the array within the original array size
<15> It has to do with the CRT (C runtime library). It maintains a separate heap for each DLL.
<12> Solamente ... does this means there is no way my DLL can access the Application heap and then sort of reallocate the array
<12> very educational
<15> Not using std::vector as provided with VS.
<15> It would be possible to create a standard library implementation that didn't use the CRT for allocation, but as yet it hasn't been done.
<12> very educational!
<15> I would really, really, really like to see a standard C++ lib with no direct reliance on the CRT.
<15> But that would be a lot of work.
<12> err Micosoft release their WTL source code... can that be done by modifying the WTL code?
<12> this is hypothetical question I really dont know what is WTL :D
<15> WTL is something else entirely.
<15> Anyway, for a good starter on Win32 memory allocation: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/memory/base/memory_management_functions.asp
<12> right on it
<15> Start at HeapAlloc and work your way through.
<15> GlobalAlloc and LocalAlloc are the older functions, and should be avoided in new code.
<12> thanks....
<12> I start programming with VB -> Borland C++ -> C# , I have miss a lot of stuff :D
<15> Yes. You completely skipped over standard C++.
<15> Not to worry. You've found us.
<16> worry !?!?!
<12> Thanks to Dragon and VawJr too..


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c++
or
Go to some related logs:

hinker for a hunk of cheese
#AllNiteCafe
#linux
CHRYSTAL METHS
ssh_exchange_identification +gentoo
#AllNiteCafe
#MissKitten
#java
#apache
#apache



Home  |  disclaimer  |  contact  |  submit quotes