Home > blog > Sudoku Build

Sudoku Build

sudoku build
how do I convert a numeric cpp string into an integer value?

I am writing a little Sudoku program as a refresher before my class starts this semester and have run into a few issues(most of which have already been remedied)

I am writing a C++ console app in visual studio 2005 that will accept entries(layout of a fresh sudoku board… from a newspaper or other source), store it in a file for later use, and read back from the file… more functionality may be built in later

the problem I have is that I am storing all the numerical data in a text form in the file and am having difficulty converting the characters/strings in the file back to integer type data for the program to work with

any suggestions?

One way to do this is with the atoi function.

Also, it is not very hard to write your own:

//assumes str is a legal integer
int atoi ( char *str )
{
int i = 0;
while (*str != ‘’) i = 10 * i + *str++ – ’0′;
return i;
}

Augmented Reality iPhone Sudoku Grab


JavaFX: Developing Rich Internet Applications


JavaFX: Developing Rich Internet Applications


$3.97


Build Rich Applications that Run on the Desktop, the Web, Mobile Devices…Anywhere! Using JavaFX, developers and graphic designers can work together to build robust, immersive applications and deploy them anywhere: on the desktop, on the Web, and on millions of Java-enabled mobile devices. JavaFX lets you maintain your existing graphics and seamlessly integrate them into Java applications. Pl…

Sudoku Live: The Multiplayer Puzzle Game


Sudoku Live: The Multiplayer Puzzle Game


$0.01


Challenge your skills against 32 online players at one time!Product InformationThe definitive SuDoku Multiplayer Game lets you challenge your friends via the Inter or LAN.  You can also play in single player challenges.  All columns must contain the nine numbers all rows must also contain the nine numbers and all 3×3 squares contain the nine numbers.  Get ready to play!Product FeaturesMultiplay…

Everyday Genius: SquareLogic


Everyday Genius: SquareLogic


$0.88


The next generation of puzzle games is here!  Taking Sudoku and Ken Ken games to a whole new level Square Logic allows you to find your inner genius. Combining simple arithmetic with colorful cages and logical problem solving this new puzzle game makes sure you never have to guess–and you don t have to be a math wiz! Square Logic can calculate and display possible solutions automatically all…



  1. No comments yet.
  1. No trackbacks yet.