[gameprogrammer] Re: Simple C++ Program

  • From: Jake Briggs <jakbri@xxxxxxxxxxxxxx>
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Mon, 25 Sep 2006 11:31:50 +1200

I could, but I am not going to. I am not trying to be mean, but the operations you'll need to perform are fairly basic. Also, google is a good resource. I would not be doing you any favours by giving you any code, unfortunately. Also, I don't really know C++, only C. Any code I give you would have little mistakes in syntax :)

Break the problem up into bits. Start with 1 2d array. google for "c++ 2d array". Here is a link to one of the results :

http://www.learn-programming.za.net/programming_cpp_learn06.html

Once you have a 2d array, learn how to iterate through it. Then start to generalise.

Jake

boris Jiron wrote:
As I said before I am new to programming. Do you think you could give me an example of the code?
----- Original Message ----- From: Jake Briggs<mailto:jakbri@xxxxxxxxxxxxxx> To: gameprogrammer@xxxxxxxxxxxxx<mailto:gameprogrammer@xxxxxxxxxxxxx> Sent: Sunday, September 24, 2006 6:41 PM
Subject: [gameprogrammer] Re: Simple C++ Program



Well your probably in a bit of trouble if you didn't understand that ^_^

Basically, say you decide that you want you letters to be 20 characters high and 10 characters wide.


1 : You make 3 2d arrays, one for each letter in your initials. So you have a 20 by 10 sized array full of B's, a 20 by 10 sized array full of A's and a 20 by 10 sized array full of J's.


2 : Print them on the screen in such a way that they appear in the correct order.
3 : Replace the right positions in the array with a space so that the array contains a B like layout.


  4 : Hand in, get an A.

  You can do 2 and 3 in any order.

  Jake

boris Jiron wrote:
> I have no idea what you just said. But I understand what Alexandros said.
> ----- Original Message ----- > From: Mike Gillissie<mailto:Niyoto@xxxxxxxxxx<mailto:Niyoto@xxxxxxxxxx>> > To: gameprogrammer@xxxxxxxxxxxxx<mailto:gameprogrammer@xxxxxxxxxxxxx<mailto:gameprogrammer@xxxxxxxxxxxxx<mailto:gameprogrammer@xxxxxxxxxxxxx>> > Sent: Sunday, September 24, 2006 5:47 PM
> Subject: [gameprogrammer] Re: Simple C++ Program
>
>
> That won't get you your A+... ;)
>
> How's this for a starting point - find a way to define a 2-dimensional array of characters and to print it on the screen. Think of this array as a grid, and create it so that it's full of the letter "B" (ie. when you print it out, it will display as a rectangular bundle of Bs.) Once you have that working, start replacing some of the Bs with spaces so that when it prints it actually LOOKS like a B made of Bs.
>
> Do that for each letter (each one in it's own array). Then you'll need only figure out how to print them side-by-side...
>
> Without actually giving away the fun parts of your homework... good luck! :)
> ----- Original Message ----- > From: alexandros mouzakidis<mailto:greatalexandros@xxxxxxxxx<mailto:greatalexandros@xxxxxxxxx>> > To: gameprogrammer@xxxxxxxxxxxxx<mailto:gameprogrammer@xxxxxxxxxxxxx<mailto:gameprogrammer@xxxxxxxxxxxxx<mailto:gameprogrammer@xxxxxxxxxxxxx>> > Sent: Sunday, September 24, 2006 5:36 PM
> Subject: [gameprogrammer] Re: Simple C++ Program
>
>
> #include <iostram>
> using namespace std;
>
> int main(){
> cout<<"BAJ"<<endl;
> return 0;
> }
>
>
> On 9/25/06, boris Jiron <xxlildragonjr@xxxxxxx<mailto:xxlildragonjr@xxxxxxx<mailto:xxlildragonjr@xxxxxxx<mailto:xxlildragonjr@xxxxxxx>>> wrote: > Hello guys/gals. I'm new to programming and one of my first assignments is to make a program that when I run it will print my initials like big. For example my intials are BAJ and it supposed to be B's that spell a big B and As that spell a big A and Js that spell a big J. I was wondering if anyone could help me. My school uses code warrior for all of our programming. Thanks ahead of time.
>
>
>


-- Jacob Briggs
Systems Engineer


  Core Technology Limited
  Level 1, NZX Centre
  11 Cable Street
  Wellington
  Phone +64 4 801 2252

  --

  object doAnythingConceivable(string whatToDo, object whatToDoItWith) { ....




--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html<http://gameprogrammer.com/mailinglist.html>




-- Jacob Briggs Systems Engineer

Core Technology Limited
Level 1, NZX Centre
11 Cable Street
Wellington
Phone +64 4 801 2252

--

object doAnythingConceivable(string whatToDo, object whatToDoItWith) { .....




--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: