48,986 Topics

Member Avatar for
Member Avatar for masterovpuppetz

I wanted know if there's a way in c++ to know what character exists at a particular x,y coordinate. for eg: suppose i used [B]gotoxy(2,5)[/B] and my cursor is now at (2,5) and i want to know what character exists next to my cursor at (3,5). How can i know …

Member Avatar for masterovpuppetz
0
142
Member Avatar for fishky

Hello guys, I'm selfstudying C++ and atm am reading about classes. I want to define ostream operator<< but compiler cant find ostream to be regular use. I'm using Visual Studio 2005 on XP SP2 and have MSDN installed. And another question - am I using proper initialisation for operator<< ? …

Member Avatar for fishky
0
983
Member Avatar for piggysmile

Is there an algorithm in C++ to determine the digit located on a given place value of an integer? For example, 9 would be outputted as the tens value of 196. If none exists, is it possible to code it? If so, what are some of your ideas to do …

Member Avatar for Denniz
0
289
Member Avatar for IrishUpstart

Hiya gang. I am currently in need of help (again! Bollocks!). Currently, i am unsure of where to start because, well, quite simply, I am not that smart. The problem is as follows: [I]Develop a program that will solve the transcendental equation x = cos(2x) to within +/- .0001 radians. …

Member Avatar for VernonDozier
0
73
Member Avatar for Dontais

This has me a bit stumped but I must be doing something wrong here, if you don't mind checking this for me would be greatly appreciated. [CODE]int main () { int input; cout << "Enter a positive intiger to determin if it is odd or even (-1 to cancel): "; …

Member Avatar for VernonDozier
0
77
Member Avatar for jazzyangelz

Hi.... I'm a beginner at this programming thing and I need some help using nested for loops this is an assignment i have to do for my class, basically the output should be something like this.. the characters depends on what the user inputs and how many rows the user …

Member Avatar for jazzyangelz
0
91
Member Avatar for dineshgautam

Hi Currently I am working in a project in which I have to track the Audio wave file in such a way there are two threads running one for write the buffer into file and second thread is used to pick the buffer after every ten seconds. I am using …

0
40
Member Avatar for afg_91320

i have this code where i have to take user input of sales and display it as a chart. (see code/sample run below) my problem is if the user enters like $923.89, it should round down to $900 -but with the code i have, it moves it up to 1000. …

Member Avatar for Ancient Dragon
0
69
Member Avatar for arifliminto86

Hi, I got some difficulity how to move bitmap image in my application basically, the algorithm is like this, I've got CDC as m_MapDC and it already being created and DrawPoint basically use for draw truck in the mapDC but the result is there is no truck in the map …

0
52
Member Avatar for FtKShadow

Alright I have been working on this game for like a week or 2 now, but I am having some trouble towards the end. Heres the code I have gotten so far: [code=c++]#include <iostream> #include <ctime> #include <cstdlib> using namespace std; char play; int guess; bool done; int noOfGuesses = …

Member Avatar for FtKShadow
0
151
Member Avatar for NayNay33

I need help with a homework assignment. The assignment is to take a paragraph from an infile and change the words French into Freedom. Also when the phrase "an arbitrary end point" is seen I need to end the paragraph. And also if an integer if present the integer needs …

Member Avatar for NayNay33
0
132
Member Avatar for chunalt787

I am trying to compile my program and I am getting alot of these errors: [CODE]Parser.cpp:9: error: stray ‘\200’ in program Parser.cpp:9: error: stray ‘\231’ in program Parser.cpp:9: error: stray ‘\342’ in program[/CODE] That sequence of three lines just keeps repeating and repeating. These are lines 8 and 9 from …

Member Avatar for stilllearning
0
146
Member Avatar for dtaylor01

Can someone run my code template to see what's wrong? [code=cplusplus] #include "stdafx.h" #include <iostream> using namespace std; int _tmain(int argc, _TCHAR* argv[ ]) { int a = 40; //No. of hrs worked during week float b = 12.75; //Pay rate: dollars per hour float c = 510; //Weekly wages …

Member Avatar for stilllearning
0
109
Member Avatar for san_sarangkar
Member Avatar for stilllearning
0
165
Member Avatar for amerninja2

[COLOR="Red"]Im using the Dev-Cpp compiler. Im trying to create a program like the one below...[/COLOR] [CODE]#include <iostream> #include <windows.h> #include <stdio.h> #include <iomanip> #include <fstream> #include <stdlib.h> using namespace System; using namespace System::IO; using namespace std; int main() { string *com2; wchar_t com; char loop; loop = 'a'; while(loop = …

Member Avatar for Ancient Dragon
0
113
Member Avatar for kalku23

I keep getting this error and cant figure it out thanks for the input. runcs216p6.cxx: In function `int main()': runcs216p6.cxx:57: error: parse error before `catch' [code] int main() { ifstream inFile; ofstream outFile; inFile.open("in.data"); outFile.open("out.data"); if(inFile.fail() || outFile.fail()) { cout << "input or out file opening failed" << endl; exit(1); …

Member Avatar for Ancient Dragon
0
60
Member Avatar for cerb63

I need some help trying to figure out the void statements for my project and also getting this second program Factorial Program without recursion to work right. [code=cplusplus] #include <iostream> #include "PROJECT_13_1_H.h" using namespace std; int main() { bool houseHasBigAce = false; srand(time(0)); int houseHand = drawOpenHouseCard(houseHasBigAce); cout<<endl<<endl; cout<<"Welcome to …

0
47
Member Avatar for TheBeast32

Hi, I'm reading a bitmap manually to try and make a program that does steganography, but I can't read the file correctly. The headers I read come out completely messed up, and they fail the check to see if I'm reading a bitmap file or not (if (FileHeader.bfType != (int)"BM")). …

Member Avatar for TheBeast32
0
151
Member Avatar for padawan

Hi everyone, I have a problem with a dll file. I have a 32 bit dll file and a program (x86 debugged) which uses the functions exported from the dynamic link library file and working well. I changed my program codes to 64 bit along time ago without an error …

0
79
Member Avatar for Aric69

evaluate a given postfix expression containing some one-letter integer variables a-z (in lower case) whose values are given in a data file. the name of the data file will be : c:\\temp\\375_prog4_stack_data.txt and you can hard code this name in your program. there will not be more than 26 different …

Member Avatar for Lerner
0
156
Member Avatar for ryanp321

Hi, i'm new to this forum and i've got a problem. I need to be able to see how much memory my applications are using. E.g Sizes of arrays, memory used then deleted .. i need to know whats going on. I would like to know how to do this. …

0
35
Member Avatar for tatainti55

Alright, i hope someone can give me a straight answer. How do i export integers to another function? Because when i compile and run this code, i get an error telling me: "[code]12 D:\test.cpp `numberr' undeclared (first use this function) [/code] The code i used was kinda like this : …

Member Avatar for tatainti55
0
102
Member Avatar for nosa2008

i have this function f(x)= e^X-3X^2 I need to write a computer program that find all three roots by the use of newton raphson method and option of finding a root by use of fixed point iteration. this is all i came up with so far.. i need help... [code=cplusplus] …

Member Avatar for Freaky_Chris
0
100
Member Avatar for Liszt

How is it possbile to return the current hour, minute and DayOfWeek. I have tried out these examples. The two first returns 0 wich is strange. And the third does not go through the compiler. What can I be missing ? [code] System::DateTime moment = System::DateTime(); int hour = moment.Hour; …

Member Avatar for skatamatic
0
80
Member Avatar for Thew

Hello, I need help in my project, where I want to catch, read and forward some packets given to another application. Example: some packets is incoming for application MyApp on port 888. The another application is running on background and listening for communication with MyApp. If the server sends packet …

Member Avatar for Salem
0
95
Member Avatar for toucan

I'm writing a C++ project using OpenGL in Microsoft Visual Studio 2005. I already have code for importing a jpeg image, but I don't know how to place it on a plane in 3D so I can view it in either ortographic or perspective projection. Also, how do I set …

Member Avatar for skatamatic
0
107
Member Avatar for dapcigar

I have an assignment in Modular programming.. Have been able to make the program work... the lil problem am having now is that when i try to load the file i created, it keeps adding the memory location. Moe like it's adding an additional data insead of just loading the …

Member Avatar for Salem
0
122
Member Avatar for faisal_pedaw

somebody please help me.. can you tell me about struct in C++.. please give me example and explaination..

Member Avatar for skatamatic
0
121
Member Avatar for kavithabhaskar

Hi folks I am new to C++ i tried to reverse the characters in an array [code=cplusplus] #include <iostream> using namespace std; int main() { char kavi[]={'s','w','o','r','d','\0'}; cout<<kavi<<endl; cout<<"now reversing the word"<<endl; int i; while(kavi[i] != '\0') { i++; } cout<<"Length is"<<i; int j; for(j=10;j>=0;j--) { cout<<kavi[i]; } } [/code] …

Member Avatar for skatamatic
0
6K
Member Avatar for Traicey

Guys I need help with creating telephone input mask on the text box I am using windows programming, I need something like this ( )- 1823121 Any help would be highly appreciated

Member Avatar for Alex Edwards
0
61

The End.