Re: linker error

2010-07-12 Thread Michael P.
j Wrote: hi, can anybody tell me please why the linker keeps bringing up this error message? i am using the latest dmd 2. thank you OPTLINK (R) for Win32 Release 8.00.2 Copyright (C) Digital Mars 1989-2009 All rights reserved. http://www.digitalmars.com/ctg/optlink.html

din.readf(%s, floattype) should work?

2010-01-29 Thread Michael P.
Is din.readf (from std.cstream in Phobos) able to read floats when using %s as the format specifier? When I used this: din.readf( %s, somedouble ); somedouble will still be nan after receiving input from the user. But when I use: din.readf( %f, somedouble ); everything goes as planned. Is this to

Re: deleting items from 2d arrays

2009-08-14 Thread Michael P.
Daniel Keep Wrote: Michael P. wrote: Okay, so I'm making a breakout type game in D. Using Derelict. I have a 2d array of Block type variables(not important what's in them) declared like this: Block[][] level; and later load into like this: level = loadLevel( levels.txt

deleting items from 2d arrays

2009-08-13 Thread Michael P.
) { if( checkCollision( ball, b.p ) ) { //remove the block?? } } } The level array has 12 lines of 'x' amount of bricks. x can be as great as 10. -Michael P.

Error: conversion, reading from file

2009-07-19 Thread Michael P.
I've having some trouble reading from a file. I am trying to read a list of high scores, each on a separate line, like this: 440 0 0 0 0 But with my code, I get an error saying: Error: conversion. Code: //Load high scores char[] file; int[] highScoreList; int nextScore; file = cast(char[])read(

dmd on ubuntu installation

2009-05-10 Thread Michael P.
Okay, I've been trying to install DMD on Ubuntu for a while, but I just can't get it. Is there an up to date guide on installing DMD on Ubuntu? I'm new to Linux too. :P I've tried quite a bit of googling, and found some stuff, but quite a bit of it won't work with the latest release, where there

Re: dmd on ubuntu installation

2009-05-10 Thread Michael P.
Frits van Bommel Wrote: Michael P. wrote: But when I type dmd in the terminal, I get this: mich...@ubuntu:~$ dmd bash: /usr/local/bin/dmd: Permission denied mich...@ubuntu:~$ Do you know why? Looks like you didn't chmod +x it. Zip files don't store *nix permissions... Okay

Re: dmd on ubuntu installation

2009-05-10 Thread Michael P.
Mike Parker Wrote: Michael P. wrote: Frits van Bommel Wrote: Michael P. wrote: But when I type dmd in the terminal, I get this: mich...@ubuntu:~$ dmd bash: /usr/local/bin/dmd: Permission denied mich...@ubuntu:~$ Do you know why? Looks like you didn't chmod +x it. Zip

Re: dmd on ubuntu installation

2009-05-10 Thread Michael P.
Michael P. Wrote: Mike Parker Wrote: Michael P. wrote: Frits van Bommel Wrote: Michael P. wrote: But when I type dmd in the terminal, I get this: mich...@ubuntu:~$ dmd bash: /usr/local/bin/dmd: Permission denied mich...@ubuntu:~$ Do you know why? Looks like

project euler #10: optimization with primes

2009-03-31 Thread Michael P.
Hey, I've started to do some of the problems on Project Euler to practice my programming skills. I'm doing #10 right now, and I think I've got a working solution. It's just that it's way too slow. Here's the link: http://projecteuler.net/index.php?section=problemsid=10 The code works fine with

Re: input

2009-01-30 Thread Michael P.
naama Wrote: How am I get a integer nimber from the user? (readln()?) the command line is: ??? import std.cstream; int number; din.readf( %d, number );

Re: .bat file to help compile easier - dmd/build

2009-01-03 Thread Michael P.
torhu Wrote: On 02.01.2009 22:21, Jarrett Billingsley wrote: On Fri, Jan 2, 2009 at 2:17 PM, Michael P.baseball@gmail.com wrote: Okay, so right now, I'm making a small game(Mario) using DAllegro. I use build, and every time, I have to type this in to compile my progress: build

.bat file to help compile easier - dmd/build

2009-01-02 Thread Michael P.
Okay, so right now, I'm making a small game(Mario) using DAllegro. I use build, and every time, I have to type this in to compile my progress: build mario alleg.lib Now, I know it's not a lot of typing. But considering I type mario wrong every so often, and I generally want to execute it

Re: .bat file to help compile easier - dmd/build

2009-01-02 Thread Michael P.
Jarrett Billingsley Wrote: On Fri, Jan 2, 2009 at 2:17 PM, Michael P. baseball@gmail.com wrote: Okay, so right now, I'm making a small game(Mario) using DAllegro. I use build, and every time, I have to type this in to compile my progress: build mario alleg.lib Now, I know it's

Re: why the array bounds error

2008-12-07 Thread Michael P.
Michael P. Wrote: Okay, I'm getting an array bounds error, and I have no clue why. Here is the code that affect it: //Constants const int SCREEN_WIDTH = 640; const int SCREEN_HEIGHT = 480; const int TILE_WIDTH = 20; const int TILE_HEIGHT = 20; //how big one tile is, in pixels const int

why the array bounds array

2008-12-07 Thread Michael P.
NUMBER_OF_TILES_HEIGHT; j++ ) { tiles[ i ][ j ] = cast( char )( rand() TYPES_OF_TILES ); //occurs here } } So, I'm not really sure why it's happening Anyone mind shedding some light on why? -Michael P.

Re: linker errors with class

2008-10-26 Thread Michael P.
Mike Parker Wrote: Michael P. wrote: BCS Wrote: Reply to Michael P., I'm getting an undefined reference error with Derelict and SDL. I tried to create an SDLImage class, but I got an error when the files try to link together. I've attached the two .d files in a rar. I compiled