@# 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 11 12 13 14 15 16



Comments:

<0> i'm trying to have exactly the same c file
<1> so, play some games with the preprocessor
<0> mhm
<2> sheesh
<1> you could awlays build it with cygwin
<1> for windows
<2> Win32 != Unix
<1> so you can use POSIX
<2> Unless you ... yeah
<2> What he said.
<0> ok...QueryPerformanceCounter
<0> i'mr eading that page but i don't get it
<2> This is a really nice reference.
<2> http://source.winehq.org/source/dlls/ntdll/time.c#L862
<2> Well, sunuvagun
<2> QueryPerformanceCounter calls NtQueryPerformanceCounter which calls...



<2> ...get ready...
<2> gettimeofday
<1> heheheh
<2> b1999, on my last link I pasted.
<2> Search that for the function implementation for NtQueryPerformanceCounter
<2> That's pretty much what you want.
<2> For an accurate time-stamp of a start and end time.
<0> bah...i don't know how to use this
<2> Hey, you wanted C.
<2> This is C.
<2> Quitcherbitchin
<0> do you know how to use this?
<2> You don't?
<2> Yes, I know.
<2> It's just code. Read it.
<2> Man is your friend.
<0> i call NtQueryPerformanceCounter with parameters counter and frequency?
<0> this is ****ed up
<3> http://source.winehq.org/source/dlls/kernel/cpu.c#L195 call this function
<1> you could do it, however less accurate, I think with GetTickCount() too
<1> is probably easier to understand
<0> jsaa; and what's the struct of counter param?
<3> pointer to a large integer... I think 64 bit... long long
<3> yeah. but you can create the variable like LARGE_INTEGER value;
<0> LARGE_INTEGER? (i've never heard of these before
<0> what do i have to include for this?
<0> msdn doesn't say
<3> no, I don't think so... it should be included in whatever QueryPerformanceCounter() is
<3> because the function uses the type
<0> now i'm completely confused
<0> =)
<3> the function uses the type PLARGE_INTEGER
<0> ok screw it..i'm gonna only do it in linux..
<0> using gettimeofday
<2> millions have figured it out before you.
<2> Millions more will figure it out after you.
<2> It's not rocket science.
<0> it is to me
<0> i still can't do it under linux =)
<0> int gettimeofday(struct timeval * tv , struct timezone * tz );
<0> how do i declare the parameters?
<0> struct timeval
<0> lol
<0> see? i'm not that dumb
<4> timeval tv;
<4> gettimeofday(&tv, 0);
<0> ya i figured that...except have to do struct timeval
<0> timeval doesn't get recognized
<4> you're coding in c++, right?
<0> c
<4> voila
<4> with c++ the code i pasted is valid
<4> you're in the wrong chan
<0> c channel is locked
<0> bastards
<4> main
<4> it's to keep bots outside



<0> main?
<4> the chan's keyword is main
<0> oh
<0> lol
<0> nice
<0> holy ****!!!
<0> all i had to do is use command 'time program.c'
<0> and it gives me the stats
<4> program.c?
<0> wihtout the .c
<0> compile program.c
<4> heh
<0> then do time program
<0> cn28h; you there?
<0> anyone know about benchamrks? where i can get c source of some benchmarks?
<5> oh jeez
<6> hello
<5> the grandfather of those seven kids died of a heart attack when hearing the news
<6> is it possible to have my own cl*** variable be ***igned to an integer? for example: " intVar = myVar", where myVar was defined as: "MyOwnCl*** myVar;"
<5> sure, if you supply a conversion operator
<6> i only know that you can overload the addition operator "+" so that int can be added to myVar, but not vice versa, so myVar=intVar is possible
<6> *same goes to "="
<5> struct Foo { Foo(int _i) : i(_i) { } operator int() { return i; } int i; }; .... Foo f(5); int i = f;
<5> hmm, i should watch rashomon
<5> it's been sitting by my dvd player for a week
<7> n e one have msdn library for 03 vc++
<6> peterhu thank you for the code
<6> but i dont understand it :)
<5> there are materials online, as well as books that can explain it better than i
<5> conversion function, cast operator, conversion operator
<5> terms are used interchangeably
<5> expertise, what do you need from it? most, if not all, of the material is online
<6> what do the " : " mean?
<5> it delimits the initialization list
<8> Expertise why do you want it?
<5> humbee: http://rudbek.com/books.html
<5> it's a great list of material for anyone that's serious about learning C++
<6> hehe thank you
<8> Humbee someone has misled you
<5> in fact, i don't think they give you your secret C++ decoder ring until you have some of those texts in your possession
<8> operator + should NOT be a member function
<9> http://www.noidea128.org/sourcefiles/15881.html
<9> could someone help me figure out why this wont compile
<5> your compiler usualily tells you why
<5> usually
<9> well it's beyond my comprehension
<10> return an int
<5> rather than running it through the front end in my brain, what's the compiler error message you're getting?
<10> or nothing
<10> oops
<10> misread
<10> did not see that the last retrun was in a function, not main
<10> you need to include cstdlib too
<10> for system()
<10> and the lib for the rand funcs too
<9> I figured it out
<10> cmath
<5> that was easy
<10> too
<5> next!
<6> ok its obvious that im not great a c, but im trying hard and still cant understand what this : is good for. a constructor is Foo() {}, but that "i( _i) and the "int i;" in the end is mysterious for me
<10> initializer syntax?
<8> Humbee what are you referring to?
<10> its just a better way to initialize members without explicitly ***igning them
<5> the example defines a single constructor to Foo, which takes an int _i as an argument. the constructor's initialization list constructs member i with _i and performs no operations in the constructor body
<8> Twister2 it constructs them
<6> vawjr m refering to the line peterhu posted at 4:18
<8> it's 2026 now
<8> err, 2036
<5> he's in germany
<6> ok :) <5> struct Foo { Foo(int _i) : i(_i) { } operator int() { return i; } int i; }; .... Foo f(5); int i = f;
<10> I forget the benefit, but remember there is one...
<8> Twister2 you don't construct THEN ***ign
<10> ah yes, that would be it


Name:

Comments:

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






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

#c++
change option of select in javacript
cannot call member function
quotes quiet women
#linuxhelp
#linux
engineuity game engine gamedev
#linux
orbframe
scriptilicious



Home  |  disclaimer  |  contact  |  submit quotes