Forum: Java 24 Days Ago |
| Replies: 0 Views: 862 Hello...
This is my naval battle game so far..
Just search i t if you're unfamiliar with the game
it is only player vs computer..
can you adjust/fix my code so that:
-the player is able to... |
Forum: C++ Mar 5th, 2009 |
| Replies: 4 Views: 291 thx.. but i think you misunderstood some things,, i need the RESULT to be empty.. not "non-null"... if it is non-null, then false..
do i need a new? i already assigned i(a node) to result..... |
Forum: C++ Mar 5th, 2009 |
| Replies: 4 Views: 291 hello,,:)
i have problem doing a FOR loop in my linked list,, it doesn't start the loop,, i don't know why...
class node
{
public:
node(int number, node*nxt):number(number),nxt(nxt){}
... |
Forum: C++ Feb 22nd, 2009 |
| Replies: 2 Views: 331 thx! it works, although im afraid my codes are not portable now..
thx again! |
Forum: C++ Feb 22nd, 2009 |
| Replies: 2 Views: 331 i have a problem with curses
my program is working properly, but when i include curses.h,
it produces errors i can't understand..
classmates.erase(classmates.begin() + i);
and the error is:... |
Forum: C++ Feb 15th, 2009 |
| Replies: 9 Views: 873 sorry,, now i'm triple posting... time trouble
this is my latest sudoku.cpp
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include "sudoku.h"
using namespace std; |
Forum: C++ Feb 14th, 2009 |
| Replies: 9 Views: 873 i think the problem is here:
in solve function:
for (int a=0; a<9; a++)
{
if (i==9)
{
if (check(a,i-1,j,rows))
{
rows[i-1][j] = (char)(a+48); |
Forum: C++ Feb 14th, 2009 |
| Replies: 9 Views: 873 thx salem.. really sorry
here's the current solve function..
void solve(vector< vector<char> > &rows)
{
bool solved=false;
int i,j;
if (solved)
{
return; |
Forum: C++ Feb 14th, 2009 |
| Replies: 9 Views: 873 thx for the great helps...
these are the new codes
main.cpp
#include <iostream>
#include <vector>
#include "sudoku.h"
using namespace std; |
Forum: C++ Feb 14th, 2009 |
| Replies: 9 Views: 873 sorry for double post
this is what inside the sudoku.dat:
3 - 6 5 - 8 4 - -
5 2 - - - - - - -
- 8 7 - - - - 3 1
- - 3 - 1 - - 8 -
9 - - 8 6 3 - - 5
- 5 - - 9 - 6 - -
1 3 - - - - 2 5 - |
Forum: C++ Feb 14th, 2009 |
| Replies: 9 Views: 873 hello everyone.. thx for droppin'
i need to write a program, a recursive sudoku solver
and this is what i have so far...
main.cpp
#include <iostream>
#include <vector>
#include... |
Forum: C++ Jan 31st, 2009 |
| Replies: 5 Views: 1,509 hello.. thx in advance
just want to ask something..
is there any portable functions that is equivalent to system("cls")?
a function that clears the screen? since system() is not portable..
... |
Forum: C++ Jan 28th, 2009 |
| Replies: 5 Views: 1,634 ok,, thx for everything..
i thought << operator in ofstream is the same as << operator in cout... now i knew it doesn't stop at white spaces..
thx again! |
Forum: C++ Jan 28th, 2009 |
| Replies: 5 Views: 1,634 ofstream,, so i can't use the 1st one..
my strings in the vectors have white spaces.. i think << stops on white spaces,, correct me if i'm wrong,, so can't use that one..
thx for help..
any... |
Forum: C++ Jan 27th, 2009 |
| Replies: 5 Views: 1,634 good day everyone.. thx for reading..
this is my problem:
i want to use the write() function, in ofstream, to write strings into a file.. but write() requires parameters of const char pointer and... |
Forum: C++ Jan 25th, 2009 |
| Replies: 3 Views: 870 sorry for double post...
i have already fixed my problem... just overlooked something..
thx for the help again.. |
Forum: C++ Jan 24th, 2009 |
| Replies: 3 Views: 870 thx,, for quick reply,, :) i have just did that..
now,, there's no more errors,,
but the problem is,, File can't be open...
when i cout the filename,, it is right,, for example ->... |
Forum: C++ Jan 24th, 2009 |
| Replies: 3 Views: 870 hello,,
i need help on how to open files by using variable names..
here's my function:
my problem is that there's always an error on the file.open line...
"no matching function to... |
Forum: C++ Jan 8th, 2009 |
| Replies: 5 Views: 381 haha.. thx again
but my problem now is the storing of individual questions to each element of vectors..
because most questions have '\n' inside them,,an example is a multiple choice-type... |
Forum: C++ Jan 7th, 2009 |
| Replies: 5 Views: 381 thx.. i haven't think of that...
read,,clear then rewrite...
hmm,,
i'll try that one..
any other ideas will still help,,
i'll try to post my codes later...
thX!! |
Forum: C++ Jan 7th, 2009 |
| Replies: 5 Views: 381 hello,, my first post here..
im a 1st year CS student..
i need a help on having the idea of how to make this assignment..
i need to make a program,,a question bank,, with this functions:
1.... |