49,766 Topics

Member Avatar for
Member Avatar for marloni

<<Forked off from [URL="http://www.daniweb.com/techtalkforums/showthread.php?t=5516&page=1&highlight=tic+tac+toe"]this thread[/URL]>> I need a ticTacToe game code ..is there any body who wrote it before:( .

Member Avatar for ~s.o.s~
0
68
Member Avatar for dmmckelv
Member Avatar for zouyu1983
0
354
Member Avatar for TylerSBreton

I've been recently reading the forums a lot, seeing people throw around the phrase "pass-by-reference" in normal C. As far as I've been taught, C only provides pass-by-value. Now.....the developers of C came up with this genious idea of passing an address (which is still a value) through the parameters …

Member Avatar for mathematician
0
182
Member Avatar for mauricio_adamo

Hi everyone: I'm reading a file (line by line) but what I wanna do is to jump some lines, but I can't really figure out how to do that. I hope someone can help me out.

Member Avatar for mathematician
0
941
Member Avatar for pugg09

I'm still really green at this, but I've been working at this for 2 hours now and I'm stuck. Can someone help me? I'll post the code first, then the error underneath. thanks everyone! [code] #include <iostream> #include <vector> #include <string> #include <fstream> using namespace std; class Resource { public: …

Member Avatar for ~s.o.s~
0
191
Member Avatar for JoBe

Hello ladies and gents, Was wondering if any of you could check this exercise out, I finished it, but, I'm not sure whether Ive got it exactly right, especially the last two definitions. The exercise is as follows: - Use typedef to define the types unsigned char, const unsigned char, …

Member Avatar for JoBe
0
376
Member Avatar for sunny123

ive created this currency interest preogram which should calculate the interest depending on the currency amount entered. if 100 but less than 1000 then 1%, otherwise 3% for all other amounts. can someone give me any ideas as how to start the interest part of the program off, and which …

Member Avatar for ~s.o.s~
0
283
Member Avatar for NSta

This is just a brief question how would i read the attributes from the tokeniser in the same order as declaration occurs in the class declaration, separated by full-colons. Tokeniser class [CODE][COLOR=#0000ff] #include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]<iostream> [/COLOR][COLOR=#0000ff]using[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]namespace[/COLOR][COLOR=#000000] std;[/COLOR] [COLOR=#0000ff]#include[/COLOR][COLOR=#000000] [/COLOR][COLOR=#800000]"Tokeniser.h" [/COLOR][COLOR=#0000ff]const[/COLOR][COLOR=#000000] [/COLOR][COLOR=#0000ff]int[/COLOR][COLOR=#000000] Tokeniser::THROW_EXCEPTION = 0;[/COLOR] [COLOR=#000000][/COLOR] Tokeniser::Tokeniser([COLOR=#0000ff]void[/COLOR]): _delim([COLOR=#800000]""[/COLOR]), _data([COLOR=#800000]""[/COLOR]), _currentPos(0), _throwException([COLOR=#0000ff]true[/COLOR]) …

Member Avatar for iamthwee
0
309
Member Avatar for aznballerlee

I have done the following, and I just want to check if I've done them all correctly: [LIST] [*]Declare a pointer variable named fp that can point to a variable of type string. [*]Declare fish to be a 5-element array of strings. [*]Make the fp variable point to the last …

Member Avatar for JRM
0
953
Member Avatar for Goldfish691

Hi there, Im trying to create a simple program that creates an 2D array of numbers and prints them to the screen via a function. I think i have got most of the way however, I cant seem to get the print function to print correctly. It's been a while …

Member Avatar for Goldfish691
0
115
Member Avatar for bops

Hi, I'm relatively new to socket programming in C/C++ but i have read a few tutorials and had a good go at trying to do it. I have got to the point where i have created a kind server that will accept incoming connections and then when the data is …

Member Avatar for bops
0
476
Member Avatar for CleverGirl
Member Avatar for ~s.o.s~
0
123
Member Avatar for nirmala.s

Hi folkz, Need help in writing a C program..The scenario is as follows: We need to copy a log file frm the database to a txt file and the txt file should automatically get updated whenever the log file is modified... Also there shld be a facility to filter data …

Member Avatar for Ancient Dragon
0
110
Member Avatar for denn0069

I have the following code: [code=c]class date { private: unsigned int nDay,nMonth,nYear; static unsigned int nMonthArr[12] = {31,28,31,30,31,30,31,31,30,31,30,31}; //LINE 36 ...[/code] Upon compilation I recieve these errors: n:\courses\8110\Labs\Lab7b\Lab7b.cpp(36) : error C2059: syntax error : '{' n:\courses\8110\Labs\Lab7b\Lab7b.cpp(36) : error C2143: syntax error : missing ';' before '{' n:\courses\8110\Labs\Lab7b\Lab7b.cpp(36) : error C2143: …

Member Avatar for denn0069
0
103
Member Avatar for ReDeViL

Hi ppl! can anyone tell me how to capture system date and o/p it later in a prog?? what function do i use?? thanks in advance! appreciate any help rendered. :cheesy:

Member Avatar for dwks
0
138
Member Avatar for kurt_tna

I've been working on this now for a couple of weeks and am still having dificulties. I'm trying to come up with a function to compute and return the area of the quarter circle by dividing it into a given number of rectangles. I need to have it accept the …

Member Avatar for mathematician
0
117
Member Avatar for JoBe

Hello ladies and gents, I'm reading The C++ PL from B.Stroustrup and in chapter 5 the second exercise goes like this: What on your system, are the restrictions on the pointer types char*, int*, and void*? For example, may an int* have an odd value? Hint: alignement. I actually have …

Member Avatar for ~s.o.s~
0
347
Member Avatar for dev.cplusplus

Hi, I was wandering if someone, can recommend a tool that does reverse engineering I have the following problem: I have a project in C++, with a lot of classes and a lot of inheritances, I want to learn all the classes and inheritances, and If I can receive the …

Member Avatar for ~s.o.s~
0
114
Member Avatar for majoy

i have compiled and run a symbian application using Visual C++. It finished building, was run and was displayed using the emulator. I wanted to do unit testing on it using C++ tool. And then i got errors which is something like this... Outbox_7000.obj : error LNK2001: unresolved external symbol …

Member Avatar for Ancient Dragon
0
183
Member Avatar for d1e9v85

hi i need help on making a recursive palindrome function of only string values. the recursive funstion shouyld return true is the string stored in the array is a palindrome, otherwise it should return false. Also the function should ignore spaces and punctuation in the string. thank you all help …

Member Avatar for WaltP
0
136
Member Avatar for aznballerlee

My program is supposed to out put 10 20 40, but it doesn't. What's wrong with it? [code] int main() { int arr[3] = { 5, 10, 15 }; int* ptr = arr; *ptr = 10; // set arr[0] to 10 *ptr + 1 = 20; // set arr[1] to …

Member Avatar for John A
0
146
Member Avatar for chubbywubba

[code]#include <iostream> #include <iomanip> using namespace std; struct Node { int number; char color; bool open; }; #define DEPTH 5 #define ROW 3 #define COL 6 void setNodes( Node nodeArray [ROW][COL][DEPTH]); void setNode (Node &node, int depth); void printArray (Node nodeprint [ROW][COL][DEPTH], int depth); void main () { Node nodeArray …

Member Avatar for vegaseat
0
70
Member Avatar for adkozak

Hi everyone I am trying to get done the stocks program the first function is readStocks, it compiles but deosnt give me rigth ptompt, i guess i have some kind of execution error. Could any one give me advice on that? THank you. [code=cplusplus] //Stock's statistic #include <iostream> #include <stdlib.h> …

Member Avatar for adkozak
0
150
Member Avatar for chubbywubba

[code] #include <iostream> #include <ctime> using namespace std; // Dynamic Single Array of integers #define dAry class DynaArray { private: int SIZE; int* array; public: DynaArray(); // Default Constructor DynaArray(const DynaArray& dAry); // Copy Constructor ~DynaArray(); // Destructor DynaArray& operator= (const DynaArray& dAry); // Assignment Operator // Accessors int getSize() …

Member Avatar for manutd
0
175
Member Avatar for Clinton Portis

I need a little help calculating odds for a roulette game.. i'm not sure why someone would bet 1:1 odds.. to me, that just means you win your money back without making a profit. also, 1:1+bet back doesn't seem any different than betting 2:1.. this is how I calculate it: …

Member Avatar for Bench
0
341
Member Avatar for srinivasdama

how to divide the given number by 3 using bitwise operators and what are other methods without using /,*,%.operators..

Member Avatar for Rashakil Fol
0
96
Member Avatar for Gunner54

Code [code] //God Mode }else if(stricmp(lpcLine, "!god") == 0){ bRet = false; if(ADDR_GODMODE[0] != 0x90){ BYTE godmode[] = {0x90, 0x90}; EnableHack((BYTE*)ADDR_GODMODE, godmode, 2); Echo("GodMode On"); } else{ BYTE godmode[] = {0x7B, 0x05}; EnableHack((BYTE*)ADDR_GODMODE, godmode, 2); Echo("GodMode Off"); } [/code] Error error C2109: subscript requires array or pointer type

Member Avatar for Lerner
0
95
Member Avatar for sameer.mastek

I am working on eSNACC 1.7 and VC++. I want to convert the ASN.1 to noraml c++ data type and vice versa. Right now I have generated code and created the dll for the C++ files generated from ASN.1 module. But the issue is with using this dll to encode …

0
67
Member Avatar for Mr Violent

I'm a bit confused on how the precompiled header system works. I'm using Visual Studio 2005 and when trying to include multiple .cpp files in a project, they each, on compile, give me an unexpected end of file error. I have them all set to precompile a header, stdafx.h, and …

Member Avatar for Mr Violent
0
139
Member Avatar for andyww14

This is my first post - Hello everybody, hopefully you can help get on straight and narrow with regards to c++ Anyway on to question: What I need to do this is to utilize the constructor of one class in a second class - thereby optimizing the code by avoiding …

Member Avatar for Mr Violent
0
104

The End.