Bump
Type: Posts; User: polarbear
Bump
Whoops! When I modified the generator to automatically put in the $ I made a mistake.
This is the functioning generator. So now that this generator problem is solved, whats causing the map program...
it's supposed to prevent and extra . from being printed
I used this code to generate the oilin.txt,which is the input for the map program.
whats supposed to happen is that each day, the $ will spread in 4 directions to become *. These * will then spread....
That was not meant to be a border. I just wanted to make the coordinates more "natural". I corrected those errors but the same thing happens.
#include<stdio.h>
int main()
{
int i,j,h;
...
For 2000 by 2000, the *(oil) appears 2 steps above the $(initial oil) and spreads 2 squares at a time, instead of to the adjacent squares.
R and C are the rows and columns. K is the number of days....
okay, i've tried it. The size of the map is variable and for numbers like 200 it works fine but for numbers like 2000, when I increment or decrement the row, it moves 2 squares instead of 1. What's...
How much do I have on the stack and how can I declare it using a heap? Will declaring on a heap make it slower?
Hi all. I am trying to write a program to simulate a 2000 by 2000 map but when I declare char map[2000][2000] it crashes immediately. char map[1000][1000] works fine, though. Why is this happening?
But that happened within the range of the array. How can it be modified by some phantom?
I fixed that issue, but some of the array values that I set to 0 initially and subsequently did not modify, start to have values? What's going on???
Thanks a lot! I'll try to correct it...
what do you mean by overflowing? what are the ranges? To use a bigger data type do i use long unsigned int or do I increase the array size? Thanks in advance.
Dear all,
I have been having trouble with this code :( . This program is supposed to brute-force verbal arithmetic, but when it is testing large numbers, the values in array x1 screw up badly....