Designing Sudoku

Hello, i'm a beginner in C++, still learning the basics, please i'm trying to design Sudoku and write a program for it, however i got stucked in trying to get my inputs to read from a file, i seem not to get the right command. Any help will be highly appreciated. Thanks
Here is a copy of the code:
// sud.cpp : main project file.

#include "stdafx.h"
#include <iostream>
#include <cmath>
#include<string.h>


{
int grid[9] [9];
using GetFileName();
int main()
//declare the variable of type ostream
//since you are dealing with output
string Filename;
Filename=GetFileName();
ofstream myfile;

//function to open the file which inlcudes
//the filename;
while(dataFile)
{
cout <<input << endl;

getline(dataFile, input, '$')
A=[5,0,0,0,0,0,0,0,0]
A1=[1,2,3,4,6,7,8,9]
A2=[1,2,3,4,5,6,7,9]
for (r=1; r<=9; r++)
for (c=1; c<=9; c++)
if A1=5
then printf finalvalue=5
dataFile.close()
int main()
{
std::string line;
std::vector< std::vector<int> > all_integers;
while ( getline( std::cin, line ) ) {
std::istringstream is( line );
all_integers.push_back(
std::vector<int>( std::istream_iterator<int>(is),
std::istream_iterator<int>() ) );
}
}
What is it you're trying to do? Is your program a sudoku game? Does it automatically solve sudoku puzzlies?... And please use the source code format when posting actual code.
yes it is, it automatically solves sudoku puzzles when it runs but i seem not be getting the right code.
Thanks
Last edited on
Topic archived. No new replies allowed.