| |
| |
| |
|
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13
Comments:
<0> You probably should read some more chapters before doing anything serious. <1> well i can't i have this exercice <1> lol <0> If you're bound to using an array then you have to use a loop to compare each of the array elements with the pointer you want to add. <1> can i know the length of an array of pointers? <2> pa ba da da da inspector gadget <2> pa ba da da da tu tuuuuu <0> dadadude: 20 <2> haha <1> looooooooooooooooooooool <1> you don't know? <2> its not that funny dada <0> 13:38 <@_m_> If you have an array then you know the number of elements. <0> 13:40 < dadadude> i have an array of pointers of size 20 <0> 13:40 <@_m_> So the array has 20 elements. <1> grrrrrrrrrrrrrrrrrrrrrrrrr
<1> waaaaaa not that :((( <2> elementary my dear watson <3> heh <4> how can i write on a special space on the desktop using borland c (something like goto(x,y) in pascal) <3> that's an OS-specific thing <3> and borland is an old, crap compiler <3> not sure how you got ahold of it <4> :( <4> and one more question <5> erm <4> can you tell me where i could find some good oop tutorial or e-books for c++? <5> www.google.com <5> search: c++ tutorial <3> no <4> OOP <3> http://www.rudbek.com/books.html <4> object oriented programing <3> those are the only resources we really recommend for learning C++ <4> are you one of the Autors? <4> :P <3> no <3> none of the authors are here <3> as far as I know <4> :P <4> i have to buy them <4> :( <3> yes <3> you get what you pay for <2> hmm AOP is quite nice for logging functionality <3> aspect oriented programming? <2> yes <2> ever played with it? <3> nope <2> you know what it is? <3> not really <3> I just googled 'aop' <2> basically <3> i've heard the term, though <2> you define function signatures <2> in a separate language for aspects <2> and you basically tell the compiler, if you see this signature, insert code before or after function execution <2> well its more complicated than that <2> you can do computations etc <3> oh, i see <3> kind of like a powerful, nice preprocessor? <2> hm but type safe too <3> right <3> neat <2> also you can do predicate logic on it, if the function execution does not throw etc <2> or if you have executed these last two functions then insert code <2> so its dynamic <2> its not C macros :) <3> ahh <3> it's done at runtime? <2> so basically I can do * *( * ) insert logging <3> or it just puts the logic in and compiles it <2> on all signatures, on any return, any argument <3> right <2> rdragon, not sure, got to read more about it <2> ultimate procrastination <2> I only used it in java
<2> cause they seem to have more advanced aspect features in java <2> nah it seems not be at runtime in aspectJ <3> nod <2> its basically woven into the original code prior to execution <2> so probably some of the dynamic features I told you about arent completely realisable :) <2> but work is being done on runtime weaving <2> of course debugging is HELL <3> gotcha <3> yeah I bet, heh <2> cause the code you see is not the code that gets executed <3> heh <2> so although its type safe you are still in macro hell <3> yeah :/ <6> http://rafb.net/paste/results/5uHWJX93.html <6> why can't i get my desired output <6> can anyone pinpoint my errors? <7> length=s1.length()-1; <7> Is why that won't work. But the entire algorithm is rather flawed <7> it'll only return you the value of the "last" character <6> O_O <6> well <6> the program condition is like this <6> enter the Roman Numbers <6> and it'll output the decimal number <6> like XII output 12 <6> how can i make that possible <6> and is my code on the track? <7> Which is a harder condition than you have programmed <7> erm, not really <7> Don't forget <7> IX = 9 <7> but XI = 11 <6> yeah <6> so the program will detect if I is lesser than X it'll make it like X-I <6> and if X>=X it'll add it together <6> so how should i code it so that it'll perform the operations above? <6> can guide me on this? <6> anyone? <7> depends if you want/have to do this all yourself <7> there will be complete algorithms on google you can have a look at <7> and then implement <6> i wanted todo it all by myself <6> so that i can learn more <6> but i can't meet the conditions stated <7> fair enough. then the first step is to work out what a "well formed" roman numeral is <7> is XIIX well formed? I would have said no <6> surely no <7> you need to find some unambiguous representation (or a way to resolve ambiguities) <7> so that would seem to be the first task in designing the algorithm <6> yeah <6> putting it on STRING is ok? <7> don't worry about the code for now. You're designing the program and solution algoritms first <7> implementation comes after you know what you're implementing :) <6> oook <6> algorithm <6> so the algorithm must contains the informtaion like <6> reads the roman numeral <6> detects that if it's well formed <6> after that ***ign value to those roman numeral <6> then do mathematical equations <7> well, you generally start with ***umptions <7> like "A roman numeral is a tuple of characters, each element being one of {I, V, X, D, C} <7> then you need to work out computable ways of converting from a tuple into a number :) <7> which will involve deciding what a valid numeral is <2> tau <6> O_O <6> so basicly algorithm is pseudocode? <6> or it's not :( <7> pseudocode is a good way of representing an algorithm, yes <7> an algorithm is just a set of steps you can perform to solve some problem <2> what is an algorithm? hmmmm turing machine, church thesis, blah blah <7> a good way to get a simple algorithm is just to write down the steps you take when you read a roman numeral <7> then you'll have a starting point <7> to simplify/make more rigerous
Return to
#c++ or Go to some related
logs:
kahuava #php #asm #php #mirc #skype #mysql dvr-ms-hack #london #linux
|
|