49,761 Topics

Member Avatar for
Member Avatar for ZIPB

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?

Member Avatar for VernonDozier
0
144
Member Avatar for hannlim
Member Avatar for lynneh3979

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", …

Member Avatar for VernonDozier
0
142
Member Avatar for nchannon

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 …

Member Avatar for mshauny
0
76
Member Avatar for karthikdebbadi

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 …

Member Avatar for karthikdebbadi
0
265
Member Avatar for miha2

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 …

Member Avatar for miha2
0
2K
Member Avatar for Shawneal

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 …

Member Avatar for aasadi
0
259
Member Avatar for Hey11
Member Avatar for SasseMan
0
94
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
589
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
138
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
152
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
230
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
238
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
692
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
123
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
285
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
244
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

The End.