49,761 Topics
| |
Hello Everyone ! I want to Create a program that will calculate and print to the screen a sales receipt. The user will enter in the number of sales items, the price for each item and the sales tax percentage. Can Anyone Help me Out? Thank You | |
Dear friends: I write a parallel program with the PETSc, it can compiled sucessfully with the following command. could you please help me to translate it into a cmake file. so i can further develop the code in kdevelop4.4. mpic++ main.cpp -o main -I/home/ztdep/Downloads/petsc-3.3-p6/include -I/home/ztdep/Downloads/petsc-3.3-p6/arch-linux2-cxx-opt/include -Wl,-rpath,/home/ztdep/Downloads/petsc-3.3-p6/arch-linux2-cxx-opt/lib -L/home/ztdep/Downloads/petsc-3.3-p6/arch-linux2-cxx-opt/lib -lpetsc -lX11 -Wl,-rpath,/home/ztdep/Downloads/petsc-3.3-p6/arch-linux2-cxx-opt/lib … | |
This program is sorting a randomized array of integers using the bubblesort algorithm. a) Try to understand the structure of the source code. Compile and run the program. b) Simplify the code and correct the program. Also the program logic can be improved! c) Modify the source code, so that … | |
currently I have a class function: class MyClass{ static int E(int A,int B, int C){ //function code } }; //and I call it like this : MyClass::E(1,2,3); //what I would like to do is call it in this way: E(1,2,3); //my current macro definition is this #define E(a,b,c) Myclass::E((a),(b),(c)) how … | |
Hi All, Pleas tell me why the following program is giving 35 as output?? if fun() returns int type then it is compilation error. why? #include<iostream> using namespace std; int &fun() { static int x = 10; return x; } int main() { fun() = 30; cout << fun(); return … | |
what are member function?? what is the use of :: in them ?? what are static and non static member function?? | |
Hi, I am doing library application, I want to create Bar Codes for each book.. I ill supply book number as input.. CAN ANYONE TELL HOW TO CREATE BARCODE BASED ON THIS BOOK NUMBER USING C++.. I AM USING DEV C++ COMPILER.. Thanks in Advance.., Shiva | |
I want to use the data members to store the info on the file and then read and display them through these two member functions in the class but i can't think of syntax. i made global variables but didn't use the data members in the class. i stored and … | |
I just started my assignment for the group and I need help with these. The question is based on here: http://sdrv.ms/16292hI I'm new to this, but I've only learned up to 'Chapter 10: Decision Making'. It's a lot of coding for this assignment and it's incomplete: // Stationery Ordering System.cpp … | |
I am looking for some advice on where to start with building my guy. I will mostly be coding on my mac, but have the option of windows or linux. I am going to be building an application that will be based around a database for my business and want … | |
Hello. I am wondering how EOFs are indicated to either the cstdio functions or the fstream functions. Mainly I am wondering how it differentiates it from data. For example, if EOF is a 2-byte code wouldn't this break the system by inserting a 'false' eof flag: for (int i=0; i<256; … | |
Kindly take look at this code, it is giving me an error in the main function. #include<iostream.h> #include<fstream.h> #include<cstdlib> #include<cstring> ofstream re; class studentinfo { private: char* VUID; char* campusID; char* Studentname; char* Fathername; public: void Storefile(char*, char*, char*, char*); char* Display() ; studentinfo(char*, char*, char*, char*); ~studentinfo(); }; studentinfo::studentinfo(char* … | |
'Ello. I'm having a concern about the ability for several objects that require access to one another. Visual studio intellisence shows no errors, but the compiler does. Mostly that classes become unrecognized. I can get different errors by shuffling around the classes within the sapa namespace. Sorry, its a bit … | |
Starting output at console: Enter : Starting output at console: Enter : 1 for >>>> Ay=75,By=110,Cy=170 2 for >>>> Ay=100,By=150,Cy=250 3 for >>>> Ay=150,By=250,Cy=350 2 for >>>> Ay=100,By=150,Cy=250 3 for >>>> Ay=150,By=250,Cy=350 | |
in command line argument i am writing argument for the main function as follows int main(int argc,char*argv[]) here argc and argv is cleared to me but why we are using char* with argv... means why we are using * ??? | |
Hi everyone.. I have to ask this question even though it will look a little silly to some of you. If I have a plugin for some open source software then how to do Install it. I'm using FLTK and have found a pluging for it. Just the sourcecode and … | |
write an program which gets the data from posters and calculate the whole area.in these picture. http://www.upload7.ir/images/03547135115551138326.jpg there is a 7 posters in picture i wish understand these:| | |
Currently I have something like this: class FileWritter{ ofstream file; public: FileWritter(string filename,A_Class a){//A_Class is class which has defined the >> and the << operators file.open(filename.c_str()); file<<a; } ~FileWritter(){ file.close(); } }; what I want is to have something like this: template <class AbstractClass> class FileWritter{ ofstream file; public: FileWritter(string … | |
A loop continuouly runs 3*Y/8. In intel processor, how to optimize the speed of this computation: 3*Y/8 | |
Hi All Can somebody clear my query that why the second operand of '+' operator is called first in the code below? When operator '+' takes left to right. #include <iostream> using namespace std; class A { int i; public: A(int i=-1){cout<<"A const i = "<< i <<endl;} int operator+(const … | |
The plan is to build an app based around a database and have it run on a server. People will then use, mac, pc, linux, or mobile devices to access the server app, mainly to pull information from the database or add to the database. I have never done any … | |
I had connected mouse successfully using 33h interrupt in my program in turbo c++ 3.0. My problem is when i press right button it takes many input and automatically jumps select other menu options by just hovering cursur over them. I want to knw how clear this buffer after every … | |
hi guys. how we can find area of posters in the pan? i need a answer!! | |
I have to write a program that takes a two dimensional array of dice and sees the combinations the dice makes within 360000 rolls. I have my code to work, but what I'm completely stumped with is printing it in a matrix. I know you have to embedd 2 for … | |
Hi. Parden me if I do not express my question very well. A project I am considering would benefit greatly from the ability to to compile a dll at runtime, on machines which may or may not have appropriate tools installed (so I may be looking at using third party … | |
http://upload7.ir/images/61610816348365199387.jpg | |
ARP ARP LANGUAGE Introduction ARP ARP Talk is a fun variation of the English language. The conversion to ARP ARP is carried out as follows: 1. When a vowel or vowel sound (a, e, i, o, u, or y as in why) is found, arp is placed in front of … | |
char* f(){ char* result;//I have to return 'result' at the end of this function, where result should be containing i (i.e. int i=97) in it. int i = 97; //Do whatever you can return result; } | |
Can any body help me in inserting mouse pointer in my program. I m using turbo c++ and i m a novic in this field. |
The End.