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



Comments:

<0> but the program doesn't continue unless you type a value
<0> so you have to type a value everytime
<0> thanks!
<0> the kbhit() function did it just fin
<0> fine
<0> :)
<0> CR000 :)
<1> kbhit? ugh
<2> a console function that catches keystrokes
<0> it's me again
<0> i'm getting an error message
<0> "Lvalue required in function ..
<0> "
<0> the function is
<0> motor_cw()
<0> { direccion=0x02; outport(0x378,direccion); }



<3> That's your whole function?
<0> yes
<3> What type does it return?
<0> void
<3> You msut specify the return type.
<0> void motor_cw()
<3> Yes.
<0> { direccion=0x02; outport(0x378,direccion); }
<0> yes, i did that
<3> And those variables are global?
<0> direccion, yes
<3> outport is declared as well?
<0> nop
<3> You need to declare it prior to being able to use it.
<0> but i've used it before
<3> Even if the definition comes later on.
<0> without declaring it
<3> That doesn't sound very possible.
<0> they come in some include file
<0> i've used inport() and outport()
<3> Could you go to the paste site and post the whole file section of that function?
<0> yep
<3> Good!
<0> where on the site?
<4> ey [kiEv] where can i found that inport() and outport()?
<3> Hm...
<3> It's pretty obvious, isn't it? o_O
<0> http://www.noidea128.org/sourcefiles/16341.html
<3> Which line is the error on?
<3> On the function declaration, or on the function's usage?
<0> on functions motor_cw() line 105
<0> and motor_ccw() line 111
<0> the compiler says both functions require an Lvalue
<3> Sorry, I really don't know.
<3> The way you're forward declaring those functions seems jsut plain wrong, though.
<3> It COULD be a valid way, but I'Ve never seen it before.
<0> where?
<2> dos.h or chipset api headers
<3> "void entrada(), salida(), leer(), motor_cw(), motor_ccw();"
<2> lol srry
<2> scroll bar was left a little up
<0> is that wrong? i've done it like that before
<0> what's the normal way to do it?
<3> One fucntion per line.
<3> void entrade(); void salida();, etc.
<3> Also, you're using outdated headers.
<4> exactly
<0> the #include things?
<3> And vawjr will rip off your head if you call "clrscr()"
<3> Yes.
<4> ctype.h is i think cctype
<0> well, i'm using an old compiler
<0> the thing is
<4> DrkMatter: so how to clear a screen in c++?
<0> i've used the outport function with those headers and declaring the functions like that
<3> Well, I guess that's the way to do it. But ltos of people don,t like having their screen cleared.
<0> and it never generated error
<2> btw as i know outport() is for 16 bit
<2> btw as i know outportb() is for 8 bit
<2> cuz i saw some spanish text with 8bit there
<1> wtf is outportb ?



<1> if you're using an old compiler, then you should stop, and get a new compiler. problem solved
<4> rdragon: so what's outportb in the new compilers?
<1> I don't even know what it is in old compilers
<0> what is an Lvalue anyway?
<1> sounds like some nonstandard library
<2> its for like interrupts and paralel ports
<1> interrupts and parallel ports?
<4> isa
<0> CR000 Lvalue is for interrupts and parallel ports?
<1> don't listen to CR000
<1> nor javaq
<0> if someone tells me what the Lvalue is i might be able to find the problem
<1> where's your code?
<4> http://www.noidea128.org/sourcefiles/16341.html
<1> an lvalue is something that can go on the left side of an ***ignment statement
<4> l for left
<1> uh, dos.h?
<0> oh
<2> well i just crused my eyes over the code
<1> i hope you realize that dos is dead
<2> and i dunno what those adresses are for
<1> main() returns int, not void
<4> CR000: those are port addresses
<2> i mean what they represent
<1> iostream.h went away in 1998, nobody should use it anymore, and modern compilers are starting to not support it
<4> rdragon: in C main is void
<1> javaq - wrong
<0> 378 is the data register of the parallel port
<2> no int main(void)
<1> http://www.research.att.com/~bs/bs_faq2.html#void-main
<2> what was the error you get again?
<2> left value
<2> k
<1> and for [kiEv]: http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.4
<2> outport = (0x378, direccion);
<2> whats that?
<2> shouldnt it be like outport (0x378, direccion);
<1> i didn't think you could use inb and outb in non-kernel code
<1> or at least, in ring3 code
<2> plus direccion is int it should be char
<1> then again, if he's using dos, all bets are off
<0> :(
<0> now i feel like i don't know sh*t
<4> [kiEv]: u keep goin man
<1> you probably don't
<0> haha, thanks rdragon
<1> sounds like you've been learning from resources made by people that don't know ****
<0> give me a break
<5> no, you can't use it
<1> that's only partially your fault
<4> rdragon: if not DOS so what?
<1> javaq hm ?
<5> you have to be in ring0 to do io on ports
<1> that's what I thought
<0> it's what i was taught in school
<1> well, that falls under my previous statement ;)
<0> in my programming cl***
<1> most teachers don't know ****
<1> about programming, at least
<1> [kiEv] if you want to learn real C++, our list of good books is here: http://www.rudbek.com/books.html
<4> i agree
<0> thanks
<4> the only learn basic skills
<4> doesn't even know OOP
<2> solved your prob?
<1> if you're interested in learning real C++, you'll have to break down to the basics, basically
<0> no
<0> i still need to get that working tonight
<5> get what working?
<2> did you fix outport = (0x378, direccion);
<2> and outport = (0x378, direccion);
<2> heh they were both same
<2> line 108 and 114
<0> hahaha


Name:

Comments:

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






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

#AllNiteCafe
#chatzone
gogoboy nus
#php
vsftpd how to enable passive
#linux
#linuxhelp
#MissKitten
#chatzone
walmart loptop sale



Home  |  disclaimer  |  contact  |  submit quotes