@# 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



Comments:

<0> "doesn't work", "don't know if it works" ... which shall I pick
<1> i'll go with the one i know i can make work :P
<2> -- ifstream in("Scopy.cpp"); ofstream out("Scopy2.cpp");string s;while(getline(in, s)) out << s << "\n"; ("dont understand what this while do")
<0> it will slowly copy the file
<1> heh
<2> to scopy2?
<2> ahaaa
<0> yeah
<3> doh
<3> now it's back to fux0red after the snazzy aurora screensaver kicked in
<3> wow, that's screwed up
<3> when i run azureus, the screen blinks for a second, and then the tv tuner's in the correct colors
<3> eh, works for me
<3> ah hah, it must be the composite rendering
<3> as it also disabled the snazzy effects
<4> hey guy anyone here?



<0> nope, just 81 corpses
<4> :-S
<4> sscanf(line, "texture \"%s\"", k[in].texName) <-- hello guys I am giving this sscanf a string that has something enclosed in double quotes and the output of this is only removing the first quote. Who can I correct this code?
<4> thast my question for the corpses then
<4> :-P
<0> why don't yo go ask that in #C very few in here want to use sscanf
<4> well I am a C programmer but I am trying to code in C++, is there any other way to do it in C++?
<0> I can't tell what you're trying to do
<4> ok
<4> I am just trying to parse a line of a file
<4> this line
<4> have something like this
<4> texture "data/tex.tga"
<4> I just want to store in a variable the portion that is enclosed in the double quotes
<0> and you're not likely to be using std::string if you were trying to use sscanf <sigh>
<4> actually I am trying to port some of mu C code into c++ and I am using char line[255]; at the moment
<4> :-O
<5> S4w try %99[^"] for buffer that can store 100 chars
<0> it may be better for you to learn your way around C++ and it's standard library some before you try porting some code
<4> let me see, but in C++ code that could be a replacement for sscanf?
<5> there isn't a direct replacement
<5> maybe string streams
<0> and depending on how many things you're parsing, you may wish to sook at stuff like boost::regex or even spirit
<5> I'd probably do this with sscanf as well, reading the lines into std::string
<0> why the hell would anyone use sscanf?
<5> simplicity (if you know the function) and portability
<3> good god does the EA downloader ****
<4> I think JacksOn- is right
<0> sscanf is a language unto itself
<3> it refuses to download because i'm not running XP
<6> Q: What simple code can I use to change the bitmap inside a picture control each time a new dialog box appears?
<3> it's a ****ing program that *downloads* files, what about that *requires* XP
<7> is there ANY way to kill a service process?
<3> need to figure out how to fake my user agent
<0> S4w no, he's not right
<5> vawjr I'm not wrong either
<0> JacksOn- why would sscanf be "more portable" than other solutions?
<0> and I disagree that sscanf is simple
<0> you may be more familiar with it because it was your only choice in C
<5> sscanf is part of C++ standard boost::regex is not
<4> vawjr: I think it is simple, this is the only case that its giving me problems
<0> JacksOn- ah THAT argument
<5> and regex is a bit of an overkill for a simple task like this
<0> the problem is, no parsing is ever "I just have this ONE line I can't do"
<0> which S4w just ***erted, incorrectly
<5> I prefer to avoid regex unless I want to parse user input regex string. don't see the need to use it for internal program purpose
<4> ^o)
<0> I don't use regex because I'm not sure when the "pattern languge" is going to actually settle down
<4> lol
<0> it seems that there was a new one every month or so for a while
<4> JacksOn-: you ment something like this? sscanf(line, "texture %99[^"]%s%99[^"]", k[in].texName)??? this is not compiling :-|
<4> might
<0> whatever
<0> but given the difficulty you guys are having getting sscanf to do what you need, I again reiterate my observation that it's not "simple"
<5> sscanf is not a simple function
<5> it's deceptively simple. easy to use it the wrong way
<4> JacksOn-: it workd great man
<5> ok. you should check for it's return value though, if you didn't
<4> yes I did
<4> thats the thing, it is inside a loop, that should stop when it matches that string. I am cheking and now it all cool
<4> one thing that I must do is to chenge all may char* to string, where is string defined? I am using cygwin



<4> s/chenge/change
<0> I wish the comittee would insist on meaningful warnings w/ respect to sizes of numbers char blah = someexpression & 0xFF is NOT a "possible lost data" warning, on a system with 8 bit chars
<0> S4w <string>
<4> let me do that now
<3> hmm
<8> does anyone know how to write a driver for nokia6260?
<2> this doesnt work http://www.noidea128.org/sourcefiles/16043.html =\ can someone help
<0> what does "doesn't work" mean?
<2> have some errors i dont know where
<0> well, I sure as hell don't know
<2> u saw?
<8> is windows written in c?
<5> kernel is
<1> and here i though it was visual basic all along :P
<8> what the kernel
<1> wtk?!
<8> what is the kernel?
<1> ah. well i'm no os design guru..
<1> but it's the 'core' of the os.
<0> ZiRa of course I looked at ti
<1> google says "the inner and usually edible part of a seed or grain or nut or fruit stone;"
<1> mmmm.... fruit stone....
<0> ZiRa what do you _expect_ it to do?
<2> ############
<2> #Dobrodosli#
<2> ############
<2> that should be output
<2> i found 1 error with string dobrodosli "Dobrodosli"; to string dobrodosli = "Dobrodosli"; =\
<0> ok, so now what
<2> 3 errors left says visual c++
<0> you probably want a comma between the args on the next line
<0> well, geezus, fix them
<0> if you double click on the error it takes you to the line !!!!!!
<9> how can i use c++ with windows gui implementation?
<9> mfc?
<10> hey
<10> is there any measures i can take to prevent users from hacking my variables?
<0> back
<0> peterhu you still here?
<3> i always knew dean stockwell was a cylon
<3> vic, here now
<11> damn, I cannot p*** a method pointer to a derived cl*** as a substition to a method pointer from base cl***....damn!
<11> back to square 1
<12> like I said last night: boost::function and boost::bind
<11> rdragon: I checked boost::function but it said something about not supporting cl*** methods, only static ones. And ::bind, I have no idea what use I have for it
<12> struct A{ void f(int){} }; boost::function<void(int)> func = boost::bind( &A::f, some_a, _1 ); func( 21 );
<12> http://www.boost.org/doc/html/function/tutorial.html#id2688553
<12> right there is the section on 'member functions'
<12> and it mentions 'bind'
<12> i guess you just didn't read the whole thing ;)
<11> lool
<11> true
<12> http://www.boost.org/libs/bind/bind.html#with_boost_function
<12> ^^ 'using bind with boost.function'
<11> what are some_a, _1?
<13> some_a is an instance of A which you want to use to call f()
<11> I see
<11> and one for one argument only?
<13> and _1 is a namespace scoped object which represents the "first" parameter
<11> ok. I wonder how these guys do it if it is impossible to substitue a base method pointer with a drived method pointer
<13> what do you mean?
<11> I mean, I though of inheriting all cl***es whose methods need to be called from a 'GenericCl***' and use that as the type GenericCl***::* in my container. But it cannot be done.
<11> even though the methods have the same signature
<13> i don't follow..
<13> oh you mean you wanted to use function pointers instead of boost::function?
<11> yes
<11> method pointers
<11> if I couldn't do it because of lack on language support, I was wondering how boost did it
<13> they use bind
<13> it binds a correct instance of a cl*** with a function pointer
<11> through what language mechanism?
<13> bind is a template function which is overloaded or specialized for member functions, it then creates a proxy object that does the appropriate thing when you call operator() on it
<13> a functor basically
<11> oh, ok


Name:

Comments:

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






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

#chatzone
#c
gentoo passwd: Authentication token manipulation error
#mirc
#AllNiteCafe
219-2690
zuma.ar
#javascript
which chinese region is nicknamed the roof on the world
#AllNiteCafe



Home  |  disclaimer  |  contact  |  submit quotes