49,756 Topics
| |
hello , i want a formula for calculating the median of an even array | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
| 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 … |
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 … | |
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 … | |
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 | |
[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 … | |
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 | |
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: // … | |
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 … | |
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> … | |
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) … | |
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. … | |
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 … | |
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 … | |
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. … | |
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 … | |
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 … | |
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. … | |
I m a computer engg student & m absolutly unable 2 undrstand c++. Cn any1 sggst sme buks or ways 2 stdy C++??????? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … |
The End.