49,756 Topics

Member Avatar for
Member Avatar for Hey11
Member Avatar for SasseMan
0
87
Member Avatar for phfilly

Hi. I would like help on undoing and redoing using the memento design pattern. I want to save a state that a board is in. Like a chessboard. If the user uses the undo option a previous board should be loaded and all of the states that the pieces was …

Member Avatar for phfilly
0
578
Member Avatar for fantasma

Greetings from Portugal I've been stuck for some hours now, since I can't get my n00b code to work as I want. Could someone give me a hint of what to do or what am I doing wrong? I have a file that writes something like this: 1001,Loja1,10 1002,Loja2,20 And …

Member Avatar for fantasma
0
128
Member Avatar for mushahidh

hi evereyone, i have some problem related to graphics in c++ that is when i include graphics.h in my program and use graphic command like draw line etc..then suddenly windows has been closed and messages appears that "NTVDM CPU HAS ENCOUNTERED AN ILLEGAL INSTRUCTION", and some error code and two …

Member Avatar for Taywin
0
147
Member Avatar for xikkub

I'm writing an application to patch assembler instructions according to memory addresses. I have been using C/stdio for FILE operations (fopen, fseek, fprintf), but I would like to have a C++/fstream implementation as well (.open, .seekp, .put). I've had no problems patching file memory with stdio, but fstream/ofstream methods corrupt …

Member Avatar for xikkub
0
229
Member Avatar for viperman224

Is it possible to make a very simple game with C++? any good sites to read up on how to do it? I have a program called Dev-C++. any kind of tips or code that i should know? I'm am just a noob at C++. I wish to play with …

Member Avatar for nrfae91
1
828
Member Avatar for getack

We have this massive project due tomorrow - a chess game that enables two or more players to play against each other. We have a board class, that contains a 2D array of Piece object pointers representing the lay area of the board. In the board constructor, the Piece array …

Member Avatar for getack
0
180
Member Avatar for jmcorpse

I just need a little advice. This code I have written works well. The only problem I am having is that the output is not lining up and I don't know what to do. If everything was entered line by line I could get it to line up. Since it …

Member Avatar for Ancient Dragon
0
70
Member Avatar for rothn

When my code (below) is executed, a error message is triggered which says "The operation completed successfully." To give this some context, hFileMap is valid; I have checked this with my debugger, and other operations can easily be performed correctly on this handle that yield correct results. The only weird …

Member Avatar for vijayan121
0
1K
Member Avatar for Hey11

hello , i want to ask is there any function that gets the mode of an array without using pointers ???plz tell me if there is

Member Avatar for vijayan121
0
77
Member Avatar for natha_peepli

[B]friend istream & operator >>(istream &, vector &); [/B] Its a operator overloading code. which should follow the genric syntax like "returntype class operator op(argu)" to declare the function.. Here istream is class and >> op....arguments going to have referal type.... [B]Question is what "&" signifies, the one is before …

Member Avatar for thelamb
0
85
Member Avatar for TheebanRaj

Hi,i'm new here..and need help for my calculation problem..pls tell me,what is the connection between this 4digit numbers..exp : 8910,0556,and 2570..how i calculate this 3 sets of numbers to get eighter 3540,6749 or 0676..canyou solve it for me..thanks

Member Avatar for Taywin
0
61
Member Avatar for Mona..

Hi.. first of all, I want an answer in details if u dont mind.. When we use a class with Pointer data members,why do we need to: 1. include a destructor and a copy constructor in the class 1. overload an assignment operator which return pointer this for example: // …

Member Avatar for group256
-2
690
Member Avatar for csc999

Hi everyone! I really need help with this big program. I got stuck! I tried to compile but it didn't work. I think i still miss some parts of the program needed, but i cant figure it out. Please help me! Thank you in advance! Here is what i need …

Member Avatar for csc999
0
151
Member Avatar for brycematheson

I am absolutely HORRIBLE at passing functions, and even more so with passing arrays. I'm trying to pass my "grades" array to the other functions, but I know I have to do it by reference since I can't return it. Can someone help shed some light? [code]#include <iostream> #include <fstream> …

Member Avatar for arkoenig
0
94
Member Avatar for andre13

I need help with a C++ problem π= 4(1/1- 1/3+ 1/5- 1/7+ 1/9- 1/11+ … 〖(-1)^n /(2n+1)+ …) How many terms of series (1) you need to use before you get the approximation p of π, where: a) p = 3.0 b) p = 3.1 c) p = 3.14 d) …

Member Avatar for mike_2000_17
0
129
Member Avatar for HBK_100

I have a file txt file with the contents [TEX]10031James Cameron2346789Spanish TownSt.Catherine12 Clover CrescentDeluxeSinglePassport[/TEX] I want to read from the file baesd on a seraching fro the id number and returning the datat to a class. But it seems I can't read from the file. Heres is the code below. …

Member Avatar for Lerner
0
153
Member Avatar for tokenjoker187

Please help me. I am having trouble implementing the breadth first search algorithm for the classic 8 puzzle problem. I have some code if anybody can help. Or is there any tutorials or examples that you can link to me? My problem is that it only solves about 5 different …

Member Avatar for alwaysLearning0
0
4K
Member Avatar for tagazin

Hello It's one year that I use G++, now every time that I try to compile somethings I see always: g++ error: process: No such file or direct I use Ubuntu and I always used to compile a file (ex. hello.cpp) g++ ./hello.cpp -o hello and after ./hello I tried …

Member Avatar for tagazin
0
122
Member Avatar for baltair

I am trying to calculate the height and width of a char array? The char is like an Ascii art of a card. And what I am trying to do is calculate how long the width is before the '\n'(newline), and how long the height is till the null terminator. …

Member Avatar for baltair
0
274
Member Avatar for ixmike88

hi i am trying to explicitly link a dll to my console application however LoadLibrary() keeps returning with error 126: the specified module could not be found the file is in the same folder as the exe, and i've tried moving it to system32 and it's the same error, so …

Member Avatar for ixmike88
0
3K
Member Avatar for Intrade

Hello guys! I'm trying to learn the Boost regex library for a more-convenient means of error-checking and the asio library to allow a fairly portable-means of manipulating data over TCP/IP. My goal is to retrieve the file information from a website (basically http layer). My first problem is determining the …

Member Avatar for Taywin
0
243
Member Avatar for confounded

I hope I'm doing this right since it's my first post. I have a hash table (HList, vector) of lists and I want to use bubble sort to sort my list of entries (HashEntry,class). It compiles fine and temp is a valid list, but my temp.end() is a bad pointer. …

Member Avatar for confounded
0
182
Member Avatar for namasee

I m a computer engg student & m absolutly unable 2 undrstand c++. Cn any1 sggst sme buks or ways 2 stdy C++???????

Member Avatar for mitrmkar
0
92
Member Avatar for jordankaushik

hey.... I'm new to c++.. i have done a program to fine the permutations of a given string....( both with and without meaning).. now i want to compare each permuted string with the dictionary and display the words which gives meaning...now i want to compare the permuted string with a …

Member Avatar for jordankaushik
0
103
Member Avatar for ixmike88

hello i have made a program that connects to multiple servers and handles packets from multiple platforms (ie irc and some others) what i want to do is make a plugin system that will use my original program for connection purpose then have the plugin system be something like that …

Member Avatar for ixmike88
0
123
Member Avatar for phfilly

Hey everyone, I'm having abit of trouble with a seg fault. As said in the topic, the piece of code that gives the error isn't really working with an array. I ran the program through the gdb tool in g++, and it says the the seg fault occurs in the …

Member Avatar for phfilly
0
134
Member Avatar for ageq

I need a help for change the code below for use it as a simple void function. I found this code on Gretl : [url]http://gretl.sourcearchive.com/documentation/1.8.2/genfuncs_8c-source.html[/url] Now i ha some problem , can someone help me. [CODE]/** * bkbp_filter: * @y: array of original data. * @bk: array into which to …

Member Avatar for ageq
0
106
Member Avatar for Ivanero

Hey guys I am trying to calculate statistics for an array such as min,max,median... etc and am not getting any answers or results although the program runs well. here's the full code so far... [CODE]//Mostafa Abdel Moez 111606 //Calculating some common statistics for an array of integers. #include <iostream> using …

Member Avatar for Ivanero
0
190
Member Avatar for rAshter

I am just beginner in c++ so I am weak in debugging c++ codes. I am having problem with the code below. It is showing segmentation error and i am not able to remove in from the code. I am using g++ editor in linux. #include<iostream> #include<string.h> #include<stdio.h> #include<stdlib.h> using …

Member Avatar for gerard4143
0
112

The End.