49,755 Topics

Member Avatar for
Member Avatar for hoceandress

how to assigned comma and period in thousand number?? (ex. 1,000.50) in c++.. this is my sample code... [code]#include <iostream> main () { int x=0,y; cout<<"Coverting Dollar to Philippine Currency:"; cout<<"\n\nEnter amount of dollar: $ "; cin>>y; x = y * 45.00; cout<<"Php "<<x; return 0; }[/code] i want to …

Member Avatar for ZirNes01
0
4K
Member Avatar for muze

hello guys.... I am making small TAPI prof which tells about the incoming of the calls. - When first time I call, it detects the incoming call. - But when I drop the call and Call again, it does not detects it. here is small code that is responsible for …

0
64
Member Avatar for nocluewhattodo

Hi, I'm new to c++ and programming all together and I really need help. So what I had to do was display a table showing the medals earned by several countries at a certain competition and their total medal count. Then I'm asked to write a function which returns the …

Member Avatar for SgtMe
0
300
Member Avatar for qvyhnl

Problem: Write the program columns that takes three command-line arguments. The first is the file to open, the second, the file to write to, and the third is the number of characters to display on each line. Read the input file, character by character, echoing to the output file, inserting …

Member Avatar for qvyhnl
0
141
Member Avatar for claudiordgz

Hi guys, I want to build a DLL to access classes and functions from a Visual Basic program This right here is my class [CODE] class SimpleDevice : public IHaptikDevice { private: // Callback Related PVOID object; PVOID method; UINT32 timerId; // State HaptikData data; HaptikUserData userdata; public: static Vector3 …

Member Avatar for claudiordgz
0
144
Member Avatar for jasleen12345

i have the following code...according to my book both the files should open...but it opens both the files...writes into them....but when i open them for reading....only one opens up....pls see where i am wrong....[CODE] #include<iostream> #include<fstream> using namespace std; int main() { ofstream fout; fout.open("country.txt"); fout<<"United States of America\n"; fout<<"United …

Member Avatar for jasleen12345
0
172
Member Avatar for chode1

11/29/2010 S 2907 1 11/29/2010 S 9673 4 11/30/2010 A 4321 30 11/31/2010 S 9673 12 12/01/2010 N 5789 wind_chimes 13.54 17.83 12/02/2010 S 5140 5 I have string date, char type and int id, processNumber. myfile>>date>>type>>id>>processNumber; does not work..what should i do?

Member Avatar for Clinton Portis
0
77
Member Avatar for Tiancailee

Hi i was given an assignment that ask me to create a simple object viewer. These are the requirements: 1. Display simple objects such as cubes, cylinders, pyramids, etc. 2. Objects should be able to rotate around all 3 dimensions. 3. There should be a parent object class from which …

Member Avatar for Tiancailee
0
167
Member Avatar for crimes

[CODE] #include <cstdio> #include <cstdlib> #include <iostream> using namespace std; int main() { int x; cout << "Press the number 1, 2 ,or 3"; cin >> x; while (x!=1){ cout<<"Please try to pick a difference selection."; cin>>x; } if ((x==1) { cout<<"\nYou chose ";cout<<x; } system("PAUSE"); return 0; } [/CODE] …

Member Avatar for crimes
0
143
Member Avatar for VilePlecenta

I am interested in being able to make a C++ win32 program that will simply display someones profile on a phpbb3 forum when they enter in their credentials. I've already made the GUI and other misc code needed for displaying the information, but I dont know how to make the …

0
97
Member Avatar for Meat!

So I am a noobie when it comes to C++, I was wondering if anyone could suggest some resources so that I can learn what is going on?

Member Avatar for chiwawa10
0
85
Member Avatar for newCoder1545

[CODE] /* Write a program which continueously calls a menu function which prints the following menu and returns to main the operation selected: 1.Add 2.Subtract 3.Multiply 4.Divide 5.Compare 6.Quit The menu function must keep printing the menu and asking for a selection, as long as the user enters an invalid …

Member Avatar for chiwawa10
0
116
Member Avatar for chode1

this is my infile's data..How do I get info into various data types? extraction operator? I know extraction works but the 5th line throws me for a loop..Thanks for help; 11/29/2010 S 2907 1 11/29/2010 S 9673 4 11/30/2010 A 4321 30 11/31/2010 S 9673 12 12/01/2010 N 5789 wind_chimes …

Member Avatar for chiwawa10
0
95
Member Avatar for flukebob

I need to build a Windows program with Visual C++ that sends an SMTP email when an alarm condition occurs. I will be reading data out of several PLCs (automation controllers) with the help of active-x controls purchased earlier for other projects. New to Visual C++, (I'm mostly an old …

Member Avatar for flukebob
0
154
Member Avatar for iamthesgt

Hello, I need to take a file filled with numbers and input them into a two-dimensional array. The file would look like: 3 6 3.9 4.5 2.1 1.0 2.4 4.3 3.1 4.2 5.1 6.2 1.0 2.7 1.2 2.3 3.1 4.2 5.2 6.4 where the first two numbers are the vertical …

Member Avatar for iamthesgt
0
169
Member Avatar for emko

Hello, I have to create a graph based program that will validate a zip code given an expression to match eg. ddddd - dddd, where d is a digit 0 - 9. I am new to graphs and don't know how to accomplish this. I'm trying to make graph class, …

Member Avatar for emko
0
122
Member Avatar for hdb25

This is my function that is supposed to take a base ten number and return the same number in a base 16(hexidecimal) format ie. 45 returns 2D instead I am getting 6850 [CODE] string inttohex (int n) { ostringstream buffer; string result; int num; num=n%16; if(num<10) buffer<<(num+'0'); else {buffer<< ((num-10)+'A');} …

Member Avatar for flukebob
0
238
Member Avatar for jsav

I'm new to file I/O in C++ and have encountered a problem. My program checks to see if file "projectdb.txt" exists. If it does, it uses its data to populate an array. If it doesn't exist, it is supposed to create the file. This is where I am having the …

Member Avatar for Agni
0
148
Member Avatar for pmikee

Hi! I have a problem, what i cant solve...I have to write a program, that settles if the most frequent birds peculiar to an area were the same. The number of areas is N. We note the number of the birds. The number of the species is M. I have …

Member Avatar for pmikee
0
144
Member Avatar for jamesl22

I am trying to write some code that reads a file line by line and then outputs the text of each line using cout. Here is what I have so far: [CODE]#include<iostream> #include<string> #include<fstream> #include<sstream> using namespace std; int main() { ifstream input("test.txt"); if (input.fail()) { cerr << "File not …

Member Avatar for Agni
0
175
Member Avatar for hystaspes

This code is from MSDN ([url]http://msdn.microsoft.com/en-us/library/6t4fe76c(v=VS.80).aspx[/url]). [CODE] #include <string.h> class String { public: String( char *ch ); // Declare constructor ~String(); // and destructor. private: char *_text; size_t sizeOfText; }; // Define the constructor. String::String( char *ch ) { sizeOfText = strlen( ch ) + 1; // Dynamically allocate the …

Member Avatar for hystaspes
0
223
Member Avatar for slacke

Hi I am developing an application in Windows environment. I was used to program under linux with Kdevelop and I do miss a feature in the Dev-c++ now. In Kdevelop I can collapse all the functions in my code even the loops and if statements. So when I collapsed all …

Member Avatar for jonsca
0
390
Member Avatar for MasterGberry

A little project I am doing for fun. I want to make a self extracting exe that will take files of format .scx and extract them to a location on the computer based on a registry key that I know of. The key will help locate the location of the …

Member Avatar for MasterGberry
0
127
Member Avatar for bookmark

Hiya. I have this program that gives me alternating squares that switch from full squares to hollow. The problem I am having is that the squares that should be hollow are showing up with numbers in them like this. Anyone know what my problem is? [CODE] *** *** *** 0000 …

Member Avatar for VernonDozier
0
120
Member Avatar for majood

Hi all, I'm writing a program to read from a stream file, one line at a time, I used getline() and fgets(), both gives a correct result, but they give a "segmentation fault" when reading the last line of the file, I think because of the NULL character at the …

Member Avatar for VernonDozier
0
1K
Member Avatar for berwick53

I have the following piece of code which works fine [CODE]data[person].history[data[person].trans]= "CASH WITHDRAWAL 100.00 GBP";[/CODE] but how would I write it so instead of 100.00 it inputs a float called safe_input2

Member Avatar for berwick53
0
94
Member Avatar for codecodile

Hi, Can anyone help me finding an application which can read listbox values of any other window on screen and save the list items either to clipboard or some text file, etc. This may be done by getting the handle of the window/listbox and then reading the values, etc. I …

Member Avatar for rohan1020
3
389
Member Avatar for bookmark

for lines 14, 15 and 16 the error is that I have undeclared identifiers for a, b and c. Does anyone know how to fix this? thanks for your help. [CODE]#include <cmath> #include <iostream> #include <string> using namespace std; bool die(const string & msg); bool getDouble(double a, const string & …

Member Avatar for Narue
0
274
Member Avatar for digan

Hi, i have this assignment to do and i dont really know what i have to do could someone tell me what i have to do in simpler language thanks Here is the assignment: Create a program which: Implements a class called Queue: The class should contain an array of …

Member Avatar for digan
0
95
Member Avatar for bigwhiteegg

here is part of a C++ function that i'm having difficulty translating [CODE]void rotate(int ls[], int n) { int j; int temp; temp = is[0]; for(j=0; j<n-1; j++) { ls[j]=ls[j+1]; } ls[n-1]=temp; }[/CODE] so far this is what i have [CODE];void rotate(int ls[], int n) j3: .EQUATE 0 temp: .EQUATE …

0
66

The End.