49,761 Topics
| |
Can anyone tell how to call a class function from a switch statement example [code] number number::operator+(number) { inputs } [/code] [code]switch (option) { case 1: number number::operator+(number); break; [/code] IS THAT THE CORRECT WAY TO CALL THE ABOVE FUNCTION? | |
Any people can help to do this? * ** *** **** Urgent~ | |
I am new to this. I am trying to write code to update every other element in an array. Here is all I have.... can't find anything to show me how to do this. [CODE]#include<iostream> using std::cout; using std::endl; int palpha = 0; int main() { char* alphabet[] ={ "A", … | |
Hi can anyone show me how I can use Directx 10 under win7 to render YUY2 video stream to overlay screen. MY display card support overlay using DirectShow and DX8 but im trying to migrate now to win7 and dx10 but am not shure how to make dx10 implement overlay … | |
Hi all, I am very much new to any forum or discussion.I am working on C++ on ubuntu. My problem is I have to transfer a file from my domain to a remote server which maintains these files using sftp which is provided by my linuc machine. I am not … | |
Hello guys, I know it's been asked a lot about it here, but that's what I should do (though I'm not quite sure what the teacher wants, is n should be 100, 1000 and further, or use prime numbers. The "first draft" is due this Sunday, the "final draft" is … | |
I have just started a basic class in programming and I am totally lost. Can someone help me out? I have to write pseudocodes and create flowchart and don't have a clue. I need help with the following: flowchart, pseudo-code, Input and Output variables, and also an Program Desk Check … | |
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. … |
The End.