Need.

can you give me a assist here? how can i make this vertical road to a horizontal road? Give me some hints on moving the Road.
Here's the Link of the code(i can't post everything,so i put it in a download link:
http://www.box.com/s/dua9jh44kdq18x51w6h4 (the Program 1)
closed account (3qX21hU5)
Just a tip most people here wont download stuff from new members or even regular members so you might better off posting some of your code or using a paste bin.
From a quick look at your program, not sure if I have this right.

But I quickly made something.

It's just a case of outputting the array in another way.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <iostream>

int main()
{
	int road[ 5 ][ 10 ] = 
	{ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 },
	  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	  { 0, 1, 1, 0, 1, 1, 0, 1, 1, 0 },
	  { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
	  { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } };

	for( int x = 0; x < 5; ++x )
	{
		for( int y = 0; y < 10; ++y )
		{
			if( road[ x ][ y ] == 0 )
				std::cout << ' ';
			else
				std::cout << ( char ) 219;
		}

		std::cout << '\n';
	}

	std::cout << "\n\n\n";

	for( int y = 9; y >= 0; --y )
	{
		for( int x = 0; x < 5; ++x )
		{
			if( road[ x ][ y ] == 0 )
				std::cout << ' ';
			else
				std::cout << ( char ) 219;
		}

		std::cout << '\n';
	}

	std::cout << "\n\n";

	return 0;
}
Last edited on
@Zereo, you don't have to download it. It loaded in another page.
closed account (3qX21hU5)
Ahh just saw download in his post so never even bothered clicking on the link
I don't download things. I speed read the post, never even saw "download", lol!
i'm just new here, so i don't know how to post some long codes here. sorry :(

thanks for doing that for me @Lynx876 :D
so how can i do it in a horizontal way?
Last edited on
Create a new project, and run the code I wrote. It first displays a horizontal road, the the vertical road. You just change the order of the array as it's outputted to the screen.
Topic archived. No new replies allowed.