Forum: C++ Feb 6th, 2009 |
| Replies: 2 Views: 246 Hi CPPRULZ ,
Might be these links can give you the answers.
1) http://www.codersource.net/cpp_copy_constructors.html
2) http://www.daniweb.com/forums/thread38304.html |
Forum: C++ Sep 3rd, 2008 |
| Replies: 4 Views: 694 Replace your line 9 with "string Data[20];"
also don't forget to comment line 34. |
Forum: C++ Jul 9th, 2008 |
| Replies: 7 Views: 1,539 http://www.computing.net/answers/programming/c-private-constructor-why/11546.html |
Forum: C++ Jul 9th, 2008 |
| Replies: 1 Views: 385 Refer the following link and try to do it by yourself
1, http://www.cplusplus.com/doc/tutorial/templates.html |
Forum: C++ Jul 8th, 2008 |
| Replies: 6 Views: 1,515 http://www.daniweb.com/forums/thread95385.html |
Forum: C++ Jul 8th, 2008 |
| Replies: 7 Views: 622 In OPTION 2 comment the following line
//inWord();
in your main function. |
Forum: C++ Jul 3rd, 2008 |
| Replies: 9 Views: 2,243 Try this,
#include <vector>
#include<iostream>
using namespace std;
int main()
{
vector<const int*> v;
return 0;
} |
Forum: C++ Jul 2nd, 2008 |
| Replies: 5 Views: 543 like this,
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{ |
Forum: C++ Jul 2nd, 2008 |
| Replies: 4 Views: 430 #include<iostream.h>
main()
{
int t,n;
cout<<"Enter a number:";
cin>>n;
t=n%10;
n=n/10;
cout<<"is:"<<n;
cout<<"is:"<<t; |
Forum: C++ Jul 2nd, 2008 |
| Replies: 4 Views: 1,447 http://linux.softpedia.com/get/Programming/Widgets/Qt-179.shtml
Yoe can easily follow this by referring Qt assistant |
Forum: C++ Jul 1st, 2008 |
| Replies: 6 Views: 1,886 Try this,
char * fbuffer;
long fsize;
ifstream cpy ("sample.txt");
ofstream target (finaldir.c_str());
cpy.seekg(0,ios::end);
fsize=cpy.tellg();
cpy.seekg(0,ios::beg);
fbuffer = new char... |
Forum: C++ Jul 1st, 2008 |
| Replies: 10 Views: 793 cout<<endl;
cout<<"\n";
both the above statements are same. Both are used to put a new line. |
Forum: C++ Jul 1st, 2008 |
| Replies: 10 Views: 793 else it will print 1223334445555...
to print like this
1
22
333
... i included that line.
Also u have to learn what happend if ypu put a semicolon at the end of for loop. Avoid mistakes.
You... |
Forum: C++ Jul 1st, 2008 |
| Replies: 10 Views: 793 Remove the semicolon after the loops.
that is
#include<iostream.h>
#include<conio.h>
void main()
{
cout<<"\n\n\n\tPATTERN\n\n\n\t" ; |
Forum: C++ Jul 1st, 2008 |
| Replies: 6 Views: 1,886 No. You are getting some garbage values.
To avoid this make sure last content of the file is '\0'.
simply write '\0' to end of the file. |
Forum: C++ Jul 1st, 2008 |
| Replies: 5 Views: 1,610 This will work fine.
You are getting and printing values to/from unallocated memory. You didn't get any garbage value because no other process intervening. |
Forum: C++ Jul 1st, 2008 |
| Replies: 3 Views: 1,930 case '1' : int HipValley(int& Rise1, int& Rise2, double& Eave, float& a);
what is this?
int HipValley(int& Rise1, int& Rise2, double& Eave, float& a);
is this a function call?
If so no... |
Forum: C++ Jun 30th, 2008 |
| Replies: 5 Views: 530 you can use like Object . Variable name; |
Forum: C++ Jun 30th, 2008 |
| Replies: 7 Views: 2,661 http://www.faqs.org/qa/qa-117.html |
Forum: C++ Jun 27th, 2008 |
| Replies: 6 Views: 2,385 thats what i mentioned in my previous post.
You can declare
string name;
instead of that character array. It will work |
Forum: C++ Jun 27th, 2008 |
| Replies: 9 Views: 640 my prevoius posy only help you to remove the error. this will works fine
#include <iostream>
#include <string>
using namespace std;
const int NR_PLAYERS = 4;
void inputInformation(int... |
Forum: C++ Jun 27th, 2008 |
| Replies: 9 Views: 640 use the following
names = (string*)namesMore;
instead of
names = namesMore; |
Forum: C++ Jun 27th, 2008 |
| Replies: 6 Views: 2,385 you can use either
cin.getline (name, '\n');
orn declare a
string name;
insread of character array. |
Forum: C++ Jun 18th, 2008 |
| Replies: 3 Views: 5,762 library for doing RSA encryption/decryption in c++?
go to http://www.cryptopp.com/ |
Forum: C++ May 20th, 2008 |
| Replies: 11 Views: 1,114 I think you are thinking about including a file in another file. Write a main function in one file and include the needed header files with that file. Also in each class include the header files... |
Forum: C++ May 19th, 2008 |
| Replies: 8 Views: 847 go through this links. This will clear you all about function pointers.
1,, http://www.newty.de/fpt/index.html
2, http://www.cprogramming.com/tutorial/function-pointers.html |
Forum: C++ May 16th, 2008 |
| Replies: 8 Views: 847 Hi,
You cannot use try as a function name in c++, because try is a keyword in c++ used for exception handling.
The following code should work.
#include<iostream>
#include<fstream>... |
Forum: C++ May 15th, 2008 |
| Replies: 4 Views: 469 I used the following method to debug
g++ -g test.cpp -o test
If i use g++ test.cpp -o test then try to use break point i got the same error. But using the above methode it could working fine.... |
Forum: C++ May 15th, 2008 |
| Replies: 4 Views: 469 Actually there is no such file named init.c in the directory. I think it may be one of the file related to gdb. I compiled my file using the option -g. And run by gdb executablefilename. then i... |
Forum: C++ May 15th, 2008 |
| Replies: 4 Views: 469 Hi ,
I am using openRTSP test program. In the make file i used debugg option.
But when i tried to debugg for example : "b 320", i got the following error.
No line 24 in file "init.c".
I don't... |