Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++: Move a character around on the screen?

Name: Anonymous 2014-03-22 12:34

You know how in Roguelike games, your character might be a "@" and you can move it around the screen in by using the directional keys or clicking? How can I do that in a simple Win32 console program?

I'm not looking to have the code written for me. I just need someone to point me in the right direction.

Name: Anonymous 2014-03-24 9:58

>>12
$ ghci
GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> 11 >> 1

<interactive>:2:1:
    No instance for (Num (m0 a0)) arising from the literal `11'
    The type variables `m0', `a0' are ambiguous
    Possible fix: add a type signature that fixes these type variable(s)
    Note: there is a potential instance available:
      instance Integral a => Num (GHC.Real.Ratio a)
        -- Defined in `GHC.Real'
    Possible fix: add an instance declaration for (Num (m0 a0))
    In the first argument of `(>>)', namely `11'
    In the expression: 11 >> 1
    In an equation for `it': it = 11 >> 1

<interactive>:2:4:
    No instance for (Monad m0) arising from a use of `>>'
    The type variable `m0' is ambiguous
    Possible fix: add a type signature that fixes these type variable(s)
    Note: there are several potential instances:
      instance Monad ((->) r) -- Defined in `GHC.Base'
      instance Monad IO -- Defined in `GHC.Base'
      instance Monad [] -- Defined in `GHC.Base'
      ...plus two others
    In the expression: 11 >> 1
    In an equation for `it': it = 11 >> 1

<interactive>:2:7:
    No instance for (Num (m0 b0)) arising from the literal `1'
    The type variables `m0', `b0' are ambiguous
    Possible fix: add a type signature that fixes these type variable(s)
    Note: there is a potential instance available:
      instance Integral a => Num (GHC.Real.Ratio a)
        -- Defined in `GHC.Real'
    Possible fix: add an instance declaration for (Num (m0 b0))
    In the second argument of `(>>)', namely `1'
    In the expression: 11 >> 1
    In an equation for `it': it = 11 >> 1

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List