Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - RulerOfNothing

Pages: 1 ... 38 39 [40] 41 42 ... 116
586
General Discussion / Re: if self.isCoder(): post() #Programming Thread
« on: September 26, 2015, 04:50:27 am »
Regarding const in C++ you need to keep in mind how it modifies pointer types:
const int* is a pointer-to-const-int, that is you can change what memory address the variable points to but you can't change the value of what is being pointed at.
int* const is a const-pointer-to-int, that is you can change the value of what is being pointed at but not what address the variable points to.
const int* const naturally is a const-pointer-to-const-int which prevents both changing the address being pointed to and the value of what is being pointed at.
My way of remembering this is that the const modifier modifies what is closest to the const. You also have references-to-const (for example: const Person& p) which is used when you want to avoid copying a large data structure into a parameter but also don't want that structure to be modified in the function.

As for two-dimensional arrays in C, basically you have one-dimensional arrays which are of type T*. Then you want a one-dimensional array of one-dimensional arrays, so you want T**. As for your specific example you want
Code: [Select]
float** A = (float**)malloc(4*sizeof(float*));because A is an array of pointers to float as I stated.[/code]

587
I think I might put up an application. Are all normal biomes allowed?

588
General Discussion / Re: if self.isCoder(): post() #Programming Thread
« on: September 22, 2015, 10:10:24 am »
I would do something like:
Code: [Select]
do
{
cout << "Please enter the radius of the circle (radius must not be negative): " << endl;
cin >> radiousC;
}
while(radiousC<0);
Also you can't have cin input to endl (as endl is actually implemented as a function)

589
Other Games / Re: Kittens! An incremental game of steam and science.
« on: September 14, 2015, 04:34:28 am »
You get additional karma (counts as a happiness increasing resource and adds 1% to happiness for every point of karma in addition to the 10% from being that kind of resource) if you have more than about 34 kittens when you reset (I'm not sure about the exact number as it has been a while since I played this game)

590
Forum Games and Roleplaying / Re: Another Evolution Game
« on: September 09, 2015, 02:11:58 am »
Evolve new chemicals to protect against temperature variance

591
Forum Games and Roleplaying / Re: Tropical Islands
« on: September 06, 2015, 04:56:02 am »
Posting to watch currently.

592
The sandrats will evolve extremely primitive tool use

593
Sandrats will evolve improved dexterity.

594
Alright, I think I'm going to throw in my hat for this one:
Name: Sandrat
Description: Basically a large rat (so omnivorous and about 40-50cm long) that burrows to avoid the harsh daylight and can act together against larger opponents/prey.
Traits: Burrowing, social animal
Habitat: Scrubland/desert

Is this good?

595
Forum Games and Roleplaying / Re: Another Evolution Game
« on: August 10, 2015, 06:26:35 pm »
Evolve a nucleus for the RNA strands

596
Forum Games and Roleplaying / Re: Another Evolution Game
« on: August 08, 2015, 07:32:02 pm »
Evolve better chemical detection.

597
Other Games / Re: Stellaris: Paradox Interactive IN SPACE
« on: August 08, 2015, 07:08:40 pm »
Also posting to watch.

598
Forum Games and Roleplaying / Re: Another Evolution Game
« on: August 05, 2015, 06:35:27 pm »
Improve mobility trough specialization of the outer cells in the colony
+1

599
Forum Games and Roleplaying / Re: Another Evolution Game
« on: July 31, 2015, 08:04:51 pm »
Evolve improved organisation for the RNA strands.

600
Forum Games and Roleplaying / Re: Another Evolution Game
« on: July 31, 2015, 02:31:47 am »
Improve chemical synthesis capabilities.

Pages: 1 ... 38 39 [40] 41 42 ... 116