49,761 Topics
| |
than the java version in this case [url]http://razi2.blogspot.com/2008/04/why-is-c-slower-than-java.html[/url] | |
Hi there, i want to build an telephonic application, for which i need a TAPI(Telephonic application programming interface) component, i search it a lot but i conldn't find it.if someone can help! | |
Im a Novice in C++ and Im writting test in few weeks time... have got this question paper and there is something about pow function... when I asked my instructor about it, he just gave me his usually glance and say I must figure it out....well now back to my … | |
hi all guru, here, my problem is re-running the program, the vector attribute of Service Class was listed unreadable characters.. WHY?? Below is my following code : Service.h code: [code] class Service{ protected: char servType[100]; vector<Medicine> vecMedicine; // the purpose that i created a vector attribute is a service can … | |
I was trying to format the string of type CString so that when you input for example once upon a time in Mexico it would return Once Upon A Time In Mexico [code] m_VideoName.Replace(m_VideoName[0],toupper(m_VideoName[0])); for(int i=1; i<m_VideoName.GetLength(); i++) { if(isspace(m_VideoName[i])) { m_VideoName.Replace(m_VideoName[i+1],toupper(m_VideoName[i+1])); } } [/code] however it keeps returning Once … | |
Hye all.. Can anybody here give some ideas or repair to make this program better.. I mean a good programming style.. This program is about using POINTER only..:) [CODE]//This program find the total rain for each year, the average //yearly rainfall and the month with the highest and lowest rainfall … | |
Hello all I joined newly in this forum. I recently started using dev-c++ 4.9.9.2 compiler for my c++ programs. I am presently reading c++ from c++ design by Cohoon and trying programs from it. For this I need to use a library called "ezwin" developed by the author. I have … | |
the problem is as follows my teacher wants me to: write a program that reads lines of text into a string using the getline(cin,line) function and then type sets these lines of text so that they are column aligned on the left and right margins as shown in the second … | |
Hi. I have a problem. This is my code. // the array.h file #ifndef ARRAY_H #define ARRAY_H #include <iostream> #include "arr_exception.h" using namespace std; class Array { friend ostream &operator <<(ostream &os, const Array &arr); // done public: Array(int n); // done Array(const Array &array); // done ~Array() {cout << … | |
i encountered the problem below, anyone can explain to me, thanks. for (;*sPtr!='\0';sPtr) cout << *sPtr; how to understand for loop ";"? thanks | |
Hey, Well I am fairly new to C++ and am supposed to create a program that compares various pizza's between size and price so the unit would be dollar/area^2 The input from the user should first be how many items you have to compare.. The next input from the user … | |
dear all what is difference when a function was called with an array as an argument and with a point as an argument? thanks. anyone can give me an example? | |
I was hoping that someone could help me out with this. For our program, we are supposed to write the following function [QUOTE]int reportMaxima( double array[ ] [ NCOLS ], int nRows, int nCols, double xMin, double xMax, double yMin, double yMax ); Finds and prints out cells in the … | |
I'm still working on the same Flight Database as before. It's a program using 3 classes each with their own header and implementation files. The 3 classes are Date, Flight, and Trip. The Date Class is only used within the Flight and Trip Classes. So those two classes each have … | |
I have three child classes which 2 of them work and the last one has the "not a base or memeber error" can anyone tell what went wrong? please see the last file at the bottom [code=cpp] # include <iostream> # include <string> using namespace std; class Employee { public: … | |
[code=cplusplus] #include <iostream> main() { int employeeid; int hoursworked; float hourlyrate, grosspay; cout << "ENTER THE EMPLOYEE ID: "; cin >> employeeid; cout << "ENTER THE HOURS WORKED: "; cin >> hoursworked; cout << "ENTER THE HOURLY RATE: "; cin >> hourlyrate; grosspay = hoursworked * hourlyrate; cout << "EMPLOYEE … | |
Hi, I am new to VC++ programming. I need to create 2 forms and and collect the data that is input in the forms to a class. Now the forms are defined in the form1.h and form2.h files. I have a class "Railway_Input" in the main cpp file. The cpp … | |
Hello, I have been wondering how to keep a value even after a program ends. An example could be a countdown of days on a trial of a product. It must be able to not be changed by the user. How would I do this? | |
Hello Everyone, I have a Blackjack Assignment due in a few days in my Programming class. I have completed the program and it seems to be working. Could I ask someone to take a look at it and tell me how it looks. Where I could make improvements and so … | |
Hallo, i stumbled over a curious behavior today, which i never saw in more than 15 years of usage of cpp compilers: The following gets compiled without any error message by gpp 3.4.5 (from mingw, included in devcpp), where i normally would seriously expect an error message: [code]sometype funcname(sometype somearg) … | |
I have two classes, Date and Flight. In my Flight object I have Two date objects. I'm running into trouble when trying to initialize the Dates. My current code is below. I don't understand why what I'm doing doesn't work. The flight header file has a #include "Date.h" command, so … | |
I wrote this code that inputs employees salaries and distributes them to how much they made. I need some help translating this code into C++ [code=c] #include <stdio.h> int main(){ int sales[9]={0}; double gross=0, percent=0, salary=0; int total=0; int counter=0; printf("For 5 peoples salary ranges, Enter the first gross\n"); scanf("%d", … | |
Hi, everybody. This is my first day here. And I create a new account because I hope to learn more from you. Here is the my task. I have a text file, it contains a DNA sequence. I want to fragment it into sequences with a definitive length into a … | |
I'm currently trying to manipulate TShape objects over multiple classes, I had a problem with #includes and now that is sorted, the only thing i'm trying to do is create shapes on one form from another class, by creating the function and then calling it in my main class, here's … | |
i compile this code in Microsoft visual studio C++. No errors.. but i cant save the file.. why ?? [CODE] #include <iostream> #include <vector> #include <fstream> #include <conio.h> using namespace std; using std::vector; class Service { public: Service( string d ) { strcpy(servDate,d.c_str()); } void setDate(string d) { strcpy(servDate,d.c_str()); } … | |
How do I access a private member of a class? [code=cplusplus] class Foo { public: int blah; private: bool whatever; }; int main() { Foo* myFoo; myFoo->whatever = true; //does not work obviously } [/code] How do I access 'whatever'? Thanks. | |
#include<iostream> #include<fstream> #include<iomanip> using namespace std; class lohi { int x; int y; public : lohi() { x=10; y=20; } }X; int main() { fstream io; io.open("just1",ios::in | ios:: out | ios::app); io.write((char*)&X,sizeof(X)); io.close(); } in this programme i expect a file to be created and contents of x,y to … | |
This is the code char number[]="0.58"; double value = atof(number); When I execute it value is 0.57999999999999996 Do you know why? Thanks in advance | |
Hello Trying to fetch a part of a string with g_regex_split. The string may look like: `"9999 00 00 CC 03 00 CC 00 00 'xxx'"` What I want is to remove everything except: `00 00 CC 03 00 CC 00 00` My idea is (since there is no get_this_part_of_string … | |
How do I write a C++ for loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 ..... 1000 I don't know anything about loops, so any help will be much appreciated Thank you much. :) |
The End.