simeesta's Profile
Reputation: 195
Stalwart
- Group:
- Active Members
- Active Posts:
- 544 (0.39 per day)
- Joined:
- 04-August 09
- Profile Views:
- 11,480
- Last Active:
May 05 2013 10:23 AM- Currently:
- Offline
Previous Fields
- Country:
- GB
- OS Preference:
- Linux
- Favorite Browser:
- FireFox
- Favorite Processor:
- AMD
- Favorite Gaming Platform:
- Who Cares
- Your Car:
- Who Cares
- Dream Kudos:
- 0
Latest Visitors
-
raghav.nagana... 
30 Oct 2012 - 04:38 -
GunnerInc 
11 Aug 2012 - 11:18 -
Aphex19 
03 Aug 2012 - 06:23 -
strawhat89 
02 Aug 2012 - 22:39 -
xy022708 
26 Jul 2012 - 05:20 -
abhishek415 
23 Jul 2012 - 08:54 -
ishkabible 
10 Jun 2012 - 09:05 -
v0rtex 
07 Jun 2012 - 08:41 -
mccabec123 
22 May 2012 - 05:56 -
darek9576 
17 May 2012 - 07:30
Posts I've Made
-
In Topic: Program stops working after this integer input
Posted 19 Feb 2013
The newline is being read, instead of your character. To remove it from the input stream you could usegetchar();
-
In Topic: Using a loop to convert hex to binary?
Posted 19 Feb 2013
Here's a version that uses a similar method to your first post:
#include <stdio.h> void toBin(int v); int main() { char string[] = "0xCCCDB"; int val; //convert string to an int sscanf(string, "%x", &val); toBin(val); return 0; } void toBin(int v) { int arr[31]; int i; for (i=0; i <31 && v != 0; i++) { arr[i] = v%2; v = v/2; } i--; while(i>=0) { printf("%d",arr[i]); i--; } } -
In Topic: Quick question: Initializing pointer vector
Posted 18 Feb 2013
Well m_pMap is a pointer to a vector. You should be able to dom_pMap = new vector<title>[MAP_WIDTH];
This creates MAP_WIDTH vectors. And you can do stuff likem_pMap[i].push_back(my_Tile);
If you just want one vector trym_pMap = new vector<title>;
At the moment you're trying to create a two dimensional array of vectors.
If you want a 2d array of vectors then you'll probably need a loop to initialise them, and the type will bevector<tile> **m_pMap;
-
In Topic: DIY sprintf
Posted 2 Aug 2012
Here'e my version. It took look me longer than it should have though. Lots of fun!Spoiler -
In Topic: Substring check
Posted 27 Jul 2012
What about:substring("adam","adadam");
Does this work?
My Information
- Member Title:
- Deadly Ninja
- Age:
- 21 years old
- Birthday:
- September 29, 1991
- Gender:
-
- Location:
- London
- Interests:
- Computers, Maths, Karate, Films, Games.
- Full Name:
- Simon
- Years Programming:
- 2
- Programming Languages:
- C/C++, Haskell, Java, X86/X86-64 assembler, prolog, MATLAB.
Contact Information
- E-mail:
- Click here to e-mail me
- Website URL:
-
http://
- Facebook:
- http://www.facebook.com/sapensadler
|
|


Find Topics
Find Posts
View Reputation Given


|
Comments
David W
07 Jun 2012 - 01:52readLine.h
Cvec.h
Clist.h
and their help function files
at ...
http://developers-heaven.net/forum/index.php/topic,2580.0.html
and ...
http://developers-heaven.net/forum/index.php/topic,2582.0.html