49,755 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
[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] … | |
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 … | |
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? | |
[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 … | |
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 … | |
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 … | |
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 … | |
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, … | |
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');} … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 & … | |
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 … | |
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 … |
The End.