49,761 Topics

Member Avatar for
Member Avatar for jray344

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

Member Avatar for jray344
0
259
Member Avatar for jbstin

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?

Member Avatar for WaltP
0
111
Member Avatar for nemoo

[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 { …

Member Avatar for vmanes
0
103
Member Avatar for Brent.tc

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 …

Member Avatar for Ancient Dragon
0
154
Member Avatar for Jacky1

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: …

Member Avatar for zandiago
0
107
Member Avatar for Rick1980

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 …

Member Avatar for Rick1980
0
2K
Member Avatar for sunrise2007

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; …

Member Avatar for sunrise2007
0
88
Member Avatar for songbirdreg

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...

Member Avatar for joshua.tilson
0
72
Member Avatar for jbstin

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?

Member Avatar for zandiago
0
100
Member Avatar for ace_joker_bt

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 …

Member Avatar for ace_joker_bt
0
349
Member Avatar for ekahbelista

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

Member Avatar for vmanes
0
122
Member Avatar for notorious_pan

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 …

Member Avatar for Ancient Dragon
0
102
Member Avatar for Love Story

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” …

Member Avatar for zandiago
0
97
Member Avatar for RichardNero

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; …

Member Avatar for Salem
0
107
Member Avatar for Justmehere

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 …

Member Avatar for Justmehere
0
195
Member Avatar for Justmehere

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 …

Member Avatar for Justmehere
0
283
Member Avatar for k88joshi

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" …

Member Avatar for iamthwee
0
129
Member Avatar for tuxman

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 …

Member Avatar for vijayan121
0
93
Member Avatar for danbellinger1

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: " …

Member Avatar for Duoas
0
235
Member Avatar for spockenheit
Member Avatar for Duoas
0
87
Member Avatar for dooda

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 …

Member Avatar for joshua.tilson
0
104
Member Avatar for Newton27

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 …

Member Avatar for iamthwee
0
125
Member Avatar for jbstin

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.

Member Avatar for Salem
0
95
Member Avatar for jbstin

can we acess the serialports of a computer using a c++ programme? ifthe answer is yes how? pleasegive me an eg. pgm.

Member Avatar for Salem
0
75
Member Avatar for jbennet

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 …

Member Avatar for jbennet
0
148
Member Avatar for nabilchampion

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 …

Member Avatar for nabilchampion
0
1K
Member Avatar for chrisliando

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 …

0
88
Member Avatar for toolmanx

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 …

Member Avatar for Duoas
0
2K
Member Avatar for webster22

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 …

Member Avatar for ithelp
0
99
Member Avatar for Duki

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 …

Member Avatar for Duki
0
121

The End.