49,761 Topics
| |
I don't understand functions that accept a variable number of arguments. I want to make a program with a max function taking any number of type double and returns the greatest of them | |
Please help me to write a programme to add two matrices. The matrices should be o 3*4 and must have necessary commend lines so that i can catch it correctly. anyone help me pls? | |
[COLOR="Green"]here is my program i think that it's right[/COLOR] [code=c++] #include<iostream.h> int main(){ int n,i=3; cout<<"please enter number to see weither it is a prime one or not"<<endl; cin>>n; if(n==2||n==3){cout<<n<<"is prime number"<<endl;} else if(n%2==0) {cout<<n<<"\t is not prime"<<endl;} else{ for(i=3;i<n;i+=2) { if(n%i==0) {cout<<n<<"\t is not a prime number"<<endl;break;} else { … | |
I have newly made my bcstring class, and it is having some strange errors. I have given it the ability of dynamically allocating memory. If the memory to be allocated is already allocated, nothing happens (correct/non-problematic); If the memory to be allocated is greater than that that is allocated, and … | |
Hi guys I wrote a c++ code but when I compile it I got some errors I couldn't figure it out course.cpp: In constructor `Course::Course(std::string, int)': course.cpp:7: error: initializer expression list treated as compound expression course.cpp:7: error: invalid conversion from `int' to `char*' main.cpp: In function `int main()': main.cpp:12: error: … | |
Hello All, I know that there is a similar thread about my problem, but I can't find it anymore. Well basically I want 2 objects to know from each other. I know that in C++ I have to use pointers to do that. I wrote some sample code to show … | |
hi:: i back with small problem and i wish to help me. i have problem with getline() i search about the solution and i find it but the problem is still see the example [CODE]#include<iostream> #include<string> #include<iomanip> using namespace std; #include<ctype.h> void validate_name(string &name)//validate_name for each student { int i; … | |
pls help me i really need a program/ system that blocks call and sms messages. i has to work in nokia n70 phones. i has to work in symbian os. pls help me i really need it badly... | |
please help me to find how to find the factorial of a number in a easy way? the methods i have seen are difficult to me .can any one heelp me to solve the problem? | |
I can make this program to copy diverse format wihout losts. example: C:\\animal.exe to D:\\animal.exe (The File location write in locale) [CODE=c++]#include <iostream> #include <fstream> using namespace std; int main () { char data[50]; char inputFile [100]; cout <<"Insert inputFilePatch :"<<endl; cin >> inputFile; ifstream inputFilePatch; inputFilePatch.open(inputFile); if(!inputFilePatch) { cout … | |
sir, i need your help will help me think a system i can use in my project, will discuss it briefly so that i can understand it... i need urgent answer ... thank you.... erika | |
we have a strin which is stored in a text file...we have to read that string from text file ....them we have to make the fragments of a string and we have to count tht word number of thye string...finally we have to put this string into the structure.... like … | |
hi everyone, it's my first thread here and i need help plz with this question below: The purpose of the program is as follows. A line of programming code is to be entered from the keyboard. Part of the code will be contained between a “Begin” string and an “End” … | |
i keep getting this error (error C2447: '{' : missing function header (old-style formal list?) can someone give me a hint or help me out, I went from 23 errors to 1. [code=c++] // Enter a grade which is 1 and 100 for user. #include <iostream> using std::cin; using std::cout; … | |
All I want to do is for some block of code to run every 10 minutes or about. Can anyone tell me is there some standard or common way of implenting a block of code that just buys some time or is it a simple loop like the following: int … | |
Can anyone tell me if its possible to declare a function and use it with multi parameters with the special character like "..." as part of the parameter list. I'm not intested in function overloading. What is the ... used for then if I'm incorrect on its useage ? Thanks … | |
Hi , I want to read in a file that has string in it and i want to convert all those strings to hex and want to find a pattern. For Example, string = "dsofijdsoifjaslifdjaslidjlasjdlasjdlsaj" and i want to find a sequence of something in Hex: " 5A 1b 1b" … | |
Hi all. First of all let me apologize by my english. I've googled a lot about my problem, but I had not find anything conclusive. I have the following piece of code: [CODE]vector < map < int , char * > > bank; bank . reserve ( 10 ); if … | |
I am writing a program that asks for numeric input until a negative number is given. My question is how do I test for no input? I currently have: [code] if ( userInput == "" ) { cout << "NOTHING TO PROCESS" << endl; } [/code] But I get: " … | |
How do i use parameters in a system call? For example: ipconfig /all | |
I hope that you could help me and solve this problem to me: write a program to read lines of characters and prints the average number of vowels (a,e,o,i.u) and the average number of characters digits that appear in each line. the input is terminated by by intering '$'. you … | |
I am trying to create a C++ program that can calculate cube root. I was assigned to use the Newton-Raphson cube root. A website that speaks about it can be found here: [url]http://www.mathpath.org/Algor/cuberoot/cube.root.newton.htm[/url] Here is my overview taken from that website: X2 = 2(X1)+a(X1^2) ___________ 3 My writing of the … | |
how can i make a new file and acces it from a class object? i refferd some book but i am not clear about it. | |
can we acess the serialports of a computer using a c++ programme? ifthe answer is yes how? pleasegive me an eg. pgm. | |
My compiler says my code isnt standard c++? [code] #include <iostream.h> //Decimal To Binary Conversion //James Duncan Bennet 2007 james.bennet1@ntlworld.com using namespace std; void binarynum(int); int main(void) { int intnum; int choice = 0; cout << endl << "Decimal To Binary Conversion" << endl; cout << endl << "Please enter … | |
Hi all I need to read a program in c/c++ in linux which shall read rtf file text and then informs me the information about the fonts properties of the text in rtf file. Can anyone tell me how to do that.. does any library exists for this that I … | |
Hi..I have a problem with serializing listView and treeView items using VISUAL C++ 2005 EXPRESS EDITION. I knew that the ListView class has a Serialize method but I don't understand how to use it. Here is my effort to make my own serialization. Actually I've been able to both serialize … | |
I've tried to clean down this code so that it will demonstrate my problem but contains little else. Just enough to make a window. This code will compile on "BCC32" or "cl". I can't figure out why I get an "Invalid handle error" when trying to create a DIB. I'm … | |
Hi, i have to programm this in c++ can anyone please help me and give me the code for this Material Weight (kg / dm3) Price (euro / dm3) Marbel 2,7 20 Stone 2,6 15 Tree 0,6 7 these three item have diffrent price and diffrent weight. Programming based on … | |
Hey guys, Here's my code: [code=c++]#include <iostream> using namespace std ; template<class T> class Pair { public: Pair ( ) ; Pair (T v1 , T v2 ) ; void setFirst(T newV ) ; void setSecond(T newV ) ; T getFirst() const ; T getSecond() const ; private: T first … |
The End.