51,592 Topics

Member Avatar for
Member Avatar for alflash

Does anyone now how to create a game id for tictactoe,i.e each new game that is played is given a game id. help

Member Avatar for jonsca
0
78
Member Avatar for llemes4011

Hi. I decided that I wanted to try something hard - write a program that allows 2 different mice to be used simultaneously by the same computer. I realize that this is going to be very difficult, and require not only C++, but probably some low level C, if not …

Member Avatar for Clinton Portis
0
104
Member Avatar for DarthPJB

Howdy, those of you who remember me may be happy to know my 2D game engine was finished and I'm now working on a 3D engine. My engine has been going rather spiffingly well, after some battles with DirectX and OpenGL i managed to get them working side-by-side. Wrote a …

Member Avatar for DarthPJB
0
305
Member Avatar for EnjozLearniz..

[B]What I want to code:[/B] 1.Given: -A range of integers iRange from 1 up to iRange -A desired number of combinations 2.Find the # of all possible combinations and print it out. For example: Given: iRange = 5 and n = 3 # of combinations = iRange! / ((iRange!-n!)*n!) = …

Member Avatar for EnjozLearniz..
0
130
Member Avatar for kako13

Hi, I'm reading a line from a text_file.txt The line looks like: 1#Jonh#Smith#PO Box#4.9#5.0# The code being used: [CODE] fstream file; file.open("Tbl_cliente.txt", ios::in); // open a file for input file.unsetf(ios::skipws); getline(file, Cli_nombre, '#'); getline(file, Cli_apellido, '#'); getline(file, Cli_dirr, '#'); file >> Cli_total_compras; file >> Cli_balance;[/CODE] But when I look for …

Member Avatar for necrolin
0
142
Member Avatar for newbiec

Hello, I have an assignment to make a tic tac toe game using 1-9 in a grid (but without 1 l 2 l 3 and instead, 1 2 3 etc.). I'm having an impossible time figuring out how to redisplay the new x or o (see function comments). Is there …

Member Avatar for Jiwe
0
102
Member Avatar for mcap61

Hey guys, I have to write a program to check the ranking of the top 1000 boy and girl baby names using linked lists and pointers. The POINT of the PROGRAM is if you enter a name it will tell you what the name ranks among the list if it …

Member Avatar for programmersbook
0
389
Member Avatar for Spiderpig085

i have code which has a menu.. this code is for a tic tac toe game and i cant prevent the program from crashing . So......... when the user enters a variable e.g 'q' the program crashes. the happens whilst playing the game and whilst selecting a menu option. is …

Member Avatar for Spiderpig085
0
141
Member Avatar for aaash

i want some help about a program which displays all prime numbers between two numbers entered by the user. plz someone help me..... i m a 1st semester programing student thats why i am finding much difficulties....

Member Avatar for zobadof
-1
94
Member Avatar for ihatestarch

There were a few book recommendations I saw on the web for c++. The C++ Standard Library: A Tutorial and Reference -- I want to purchase this book, but it was published in 1999. Is there a more current book like this or is it one of those things that …

Member Avatar for Bench
0
110
Member Avatar for sciwizeh

Hello I have a sample program from a book, it's not working properly, when the function [icode]d3d10createdeviceandswapchain[/icode] is called the error checking causes the program to fail, after adding a few lines of code I found that the error code isn't one of the constants that the function is supposed …

0
47
Member Avatar for qwertymk

I have a line of code that looks like this: [code] _data = new (nothrow) T[_size]; [/code] This code is inside a classe's constuctor The problem is that it initializes each element to zero which I don't want it to do. Is there to just have it reserve the memory …

Member Avatar for qwertymk
0
120
Member Avatar for Snapster5

Hi im working on a function lab that was givin to use, there are compile erros on it im not sure how to fix, most likely caused by mistakes by me not wrinting correctly. If you can help me out on this would be appreciated. Discription: The purpose of the …

Member Avatar for Ancient Dragon
0
149
Member Avatar for xyzt

Hello, I try to use POSIX Message Queue API and in the doc it says that: [CODE]#include <mqueue.h> int mq_send(mqd_t mqdes, const char *msg_ptr, size_t msg_len, unsigned msg_prio); [/CODE] [I]The mq_send() function shall add the message pointed to by the argument msg_ptr to the message queue specified by mqdes. The …

Member Avatar for kbatra
0
906
Member Avatar for StaticX

Hi Im having a problem when it comes to dynamic memory allocation.I have a program that lets me pick the size of my array,and then input numbers into it. That all works well,it is when I try to add another int to this array that im having problems with,could anyone …

Member Avatar for StaticX
0
339
Member Avatar for ali8888

I have a question, and it is: How create win32 application in Microsoft Visual Studio 2008 ?? I do not want to select " Empty project " in " Additional options: ". i.e. I want use visual window for my program. Please help me. My language is C++.

Member Avatar for ali8888
0
171
Member Avatar for srvishnukumar

Hi Friends, I dont Know That how to view the data [ie : Fill the datas] from Gird to textbox.... Plz Explain me With Example Thanks with Vishnu

Member Avatar for Silverfox13
0
123
Member Avatar for Hiromi

Hello i am trying to implement a wordPuzzle but i am having trouble with the last two functions that i need to implement. this is what i am doing. as i'm reading the dictionary from a text file i am checking the length of the word and according to its …

-1
61
Member Avatar for amosda4183

I have to write a memory game, where the user gives a file name and that file reads in 8 strings that will be placed on the board. The code I have so far is down below, if anyone can help me fix it up I would appreciate it. [CODE] …

Member Avatar for Lerner
0
330
Member Avatar for tomtetlaw

I have seen an array struct in C that can hold data even if they are a different type. I forgot what that code was and I don't have the code on me at the moment. So I was wondering if anyone could show me how I would do this …

Member Avatar for mrnutty
0
1K
Member Avatar for buzzykerbox

Hey Guys and Gals,I'm writing a program to find the highest and lowest of 5 integers.I think i have the algorithm almost right but it doesn't work.I think its something simple.......as usual......... [CODE] include <iostream.h> include <conio.h> int main () { double total=0,num1,num2,num3,num4,num5,high,low; cout<<please enter number; cin>>num1; cout<<please enter number; …

Member Avatar for buzzykerbox
0
2K
Member Avatar for StaticX

Hi, I am currently running on windows and have and issue when i try to read/write files,the problem being that it just doesn't happen. I know the code is correct because when I use a linux os and other windoze machines everything is ok..it just seems to be my computer. …

Member Avatar for StaticX
0
109
Member Avatar for qk00001

Hi people, Do you have any good sites for C++ MySQL.Especially how the 'query' part works in the C++. Thanks a lot!!!

Member Avatar for VernonDozier
0
158
Member Avatar for javaStud

Hi, I am trying to transfer some numbers that I have generated inside an array,but I have some mistake that I am not 'seeing'. The array contents are not the same as those generated. Any help please.. Thanks a lot. [CODE]#include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #define SIZE …

Member Avatar for javaStud
0
93
Member Avatar for merse

Lets have a class (called Class with capital C) have a class member data. But when we declare the class data in the body of the Class, we have to initialize it with something (default constructor or other constructor) however in c++ the initialization used to task to the Class …

Member Avatar for Narue
0
136
Member Avatar for swolll

What does "->" do for vectors? And, how do you use the vector algorithms? And, also, when/why do you use #ifndef something_H, #define something_H, ..., #endif? Is there a difference between "vector" and "apvector"?

Member Avatar for jonsca
0
115
Member Avatar for mcap61

I have to write a program to check the ranking of the top 1000 boy and girl baby names using linked lists and pointers. I have based most of my work off a tutorial from this website [URL="http://richardbowles.tripod.com/cpp/linklist/linklist.htm"]http://richardbowles.tripod.com/cpp/linklist/linklist.htm[/URL] And here is the link to the list of names. You probably …

Member Avatar for jonsca
0
230
Member Avatar for hao90

i think this part got problem..anyone can guide me? [CODE]ifstream BanKing; BanKing.open("BankData.txt"); while (!BanKing.eof()) { BanKing>>loginName; BanKing>>password; if(loginName == loginName1 && password == password1) { menu(); break; } else { cout<<"\tUnregistered ID or you have enter a wrong password !"<<endl; cin.clear(); cin.ignore(); getchar(); return ; } BanKing.close(); } }[/CODE] i …

Member Avatar for hao90
0
176
Member Avatar for new programer

Hello, I want my program to repeat it self if the user entered a specific number and to terminate if he entered any other number or charcter the repeating part worked put the terminating part did not . it kept on doing an infinate loop how can I fix it …

Member Avatar for mrnutty
0
93
Member Avatar for Ryujin89

I have created a class that allows the user to input their mailing address, order date, type of cookie ordered and the quantity. I'm taking things step by step and have got the program running, but I can't get the comparing part to work. It will accept any string as …

Member Avatar for Ryujin89
0
113
Member Avatar for UberJoker

Hello everyone. Got a bit of a weird problem here. I cant seem to figure out a way to read a file with a format like this... hello what 100 200 its a string string integer integer i need to put each of those values in separate arrays. eg: array1[0] …

Member Avatar for UberJoker
0
153
Member Avatar for pramaku

Hi, Can any one tell me how to print address of a non static member functions of a class in C++. Thanks in advance.

Member Avatar for kvprajapati
0
47
Member Avatar for computerages

Hello, I have a command line program which opens other programs. I want to make it multi-threaded so multiple programs can be opened at one time. Following is my code with using thread. I tried to incorporate threads using this online tutorial, but it did not help. [[url]http://www.computersciencelab.com/MultithreadingTut1.htm][/url] [code] #include …

Member Avatar for Murtan
0
94
Member Avatar for mokia1

This is the problem Write a program to assign passengers seats in an airplane. Assume a small airplane with seat numbering as follows: A 1 2 3 4 5 B 1 2 3 4 5 C 1 2 3 4 5 D 1 2 3 4 5 E 1 2 …

Member Avatar for mokia1
0
280
Member Avatar for nilesh89

can u show me hw to do puzzle from maze: i need ur help sir please: the instruction is like below: 1) Get all types of puzzles from maze.txt, create a menu and display them on the screen, so that users can choose the puzzle. The menu’s content must consist …

Member Avatar for jjjww
-8
85
Member Avatar for hao90

Can anyone guide me how to solve for the login problem..i think is the read file problem.. I try many ways but can't. here the code: [CODE]#include <iostream> #include <string> #include <fstream> #include <cstdlib> #include <cmath> #include <windows.h> using namespace std; class bankAccount { private: string name, loginName,loginName1; float IDnum; …

Member Avatar for hao90
0
286
Member Avatar for najlaaa

please warp code in progrmming ********* Welcome to my Hotel ********* Menu:. 1-Add inmate. 2-Display all inmates. 3-Search for inmates. 4-Delete inmate. 5-Exit program. Enter choice [CODE] cout<<"enter you name inmate"; cout"add inmate";[/CODE]

-3
45
Member Avatar for iammfa

Hi all, A year ago, I began to study the basics of the C++ language and I was able to successfully passed this stage .. Thanks to everyone who helped me in this especially [B][I]DaniWeb[/I][/B] users ..:* But always hesitate in my mind a question: what should be done later …

Member Avatar for necrolin
-1
182
Member Avatar for rafta

I have wrote this code about Soccer score using Data Structures, but it does not give me the Highest Score, Name of the Highest Score achiver and the Table of Players and their scores,points. As its getting longer and longer i am getting confused. Please help me [CODE] #include <iostream> …

Member Avatar for rafta
0
153
Member Avatar for jdrei

i'm trying to add two arrays and i can't seem to get my carry to work in my add function. for example, if array a has 1,2,3, and array b has 5,6,7, i should get 690. but since there is a flaw here, i get 680. why? can anyone point …

Member Avatar for jdrei
0
86
Member Avatar for angel1204

I am taking entry level C++ course, and I am having trouble with my assignment for this week on Sequential Files. Here is my assignment: Create a C++ console application that analyzes the contents of a text file. Your program should count the number of: lines (hint: use getline) words …

Member Avatar for Clinton Portis
0
127
Member Avatar for seeplusplusbeg

I need help creating a program. I have a text file that is 0's and 1's which create a picture. There are 33 rows and 50 columns. Every row contains 0's and 1's. what i need to do is do a program that will read the zeroes and ones and …

Member Avatar for necrolin
0
118
Member Avatar for Seriss

Part of my program displays a list of valid IDs, their pay, and a list of bad ids. Several of the values are.. empty I guess so they display as 0s. How can I keep that from happening?

Member Avatar for Seriss
0
84
Member Avatar for Darkmist

Hi, I am working on a program, it asks user for a file name and opens that file with that name, do some calculations and create a new file with the filename.output (.output is the extension) and save the contents into it. I have been working on it for a …

Member Avatar for Clinton Portis
0
269
Member Avatar for ericwshoemaker

Hi all, I have a c++ program i'm working on focusing on pointers in a circular linked list. I need to have the user specify the position of the "dog" in the line (the program is a mock dog show). Then a function checks for the specified position and returns …

Member Avatar for ericwshoemaker
0
82
Member Avatar for Instinctlol

can anyone help me convert this code from array to Vector? I need this in it [CODE]class VectorList { vector<WeatherStation> List; vector<WeatherStation>::iterator ThroughTheList; public: VectorList() {;}[/CODE] [CODE]#include <iostream> #include <string> using namespace std; class WeatherStation { string StationDesignation; //Identifies the station string StationAgent; //Who's responsible double Temperature; //The temperature public: …

Member Avatar for Clinton Portis
0
117
Member Avatar for cwarn23

Hi and I have a simple question. I am designing a c++ application but I need to be able to import pictures from file (nearly all formats) then to place the pixel colors into an array. Also when retrieving the pixel colors it needs to retrieve the RGB scale and …

Member Avatar for cwarn23
0
103
Member Avatar for Mclovin1234

Hey i need help with my program, I need to flip a coin and check how many heads and tails has been flipped. Heads = Win and Tails = Lose. What im trying to do is how do i calculate the winning totals for example what i want is Heads …

Member Avatar for Clinton Portis
0
123
Member Avatar for moods125

can someone help me do this problem An array can be used to store large integers one digit at a time. For example, the integer 1234 could be stored in the array a by setting a[0] to 1, a[1] to 2, a[2] to 3, and a[3] to 4. However, for …

Member Avatar for moods125
0
273
Member Avatar for Nikhar

Note:- I am NOT asking you to write the program for me. I am NOT asking you to do the homework for me either. All I am asking you is if you could suggest an algorithm for me. Present below are two algorithms. Can you please suggest me an algorithm …

Member Avatar for nezachem
0
132

The End.