Forum: C++ Feb 16th, 2008 |
| Replies: 10 Views: 1,245 dexter1984,
Why don't you simply use vector of vectors
#include <vector>
template <typename T>
class dynamic_array
{
public: |
Forum: C++ Feb 16th, 2008 |
| Replies: 1 Views: 506 Function call operator is () not []. There are few undeclared variables and some variables with incorrect names. |
Forum: C++ Feb 14th, 2008 |
| Replies: 7 Views: 3,137 Like Larry Wall said:
"Make simple things easy." |
Forum: C++ Aug 23rd, 2007 |
| Replies: 3 Views: 1,946 Internet File Downloading Function
http://www.codeguru.com/cpp/i-n/internet/filetransfer/article.php/c3399/
(http://www.daniweb.com/forums/Internet%20File%20Downloading%20Function) |
Forum: C++ Aug 21st, 2007 |
| Replies: 11 Views: 4,848 Startup routines that call main could be assuming that the return value will be pushed onto the stack. If main() does not do this, then this could lead to stack corruption in the program's exit... |
Forum: C++ Aug 20th, 2007 |
| Replies: 3 Views: 4,656 Just take typedef int value_type; out of class. Things should work. |
Forum: C++ Dec 23rd, 2006 |
| Replies: 15 Views: 3,736 I think it's waste of time solving your problem for Turbo C. Better get a new compiler Check this link
http://www.daniweb.com/techtalkforums/thread50370.html |
Forum: C++ Dec 20th, 2006 |
| Replies: 5 Views: 2,668 Visual Leak Detector (http://www.codeproject.com/tools/visualleakdetector.asp) |
Forum: C++ May 24th, 2006 |
| Replies: 7 Views: 1,485 #include <iostream>
int main()
{
char str[10];
std::cout<<"Enter a string:";
std::cin.getline(str,10);
std::cout<<str;
return 0;
} |
Forum: C++ May 24th, 2006 |
| Replies: 7 Views: 1,485 Are you sure your code works fine?? |
Forum: C++ May 23rd, 2006 |
| Replies: 5 Views: 1,486 It is illegal to jump past a declaration with an initializer unless the declaration is enclosed in a block.
So, do this
#include <iostream>
#include <string>
using namespace std;
int main ()... |
Forum: C++ May 23rd, 2006 |
| Replies: 5 Views: 1,486 Only one case will be executed. |
Forum: C++ May 23rd, 2006 |
| Replies: 4 Views: 4,942 Read this
http://www.parashift.com/c++-faq-lite/intrinsic-types.html |
Forum: C++ May 20th, 2006 |
| Replies: 8 Views: 2,601 I tried your code with DEV 4.9.9.2. It's working fine on my end. It even works fine on microsoft compiler. |
Forum: C++ Jan 18th, 2006 |
| Replies: 12 Views: 2,403 beuls use [] instead of <> for code tags |
Forum: C++ Jan 17th, 2006 |
| Replies: 2 Views: 1,640 Replace your headers with these
#include <sstream>
#include <string>
#include<iostream> |
Forum: C++ Jan 17th, 2006 |
| Replies: 2 Views: 11,962 Visit
http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046996179&id=1043284385 |
Forum: C++ Jan 15th, 2006 |
| Replies: 6 Views: 1,777 1.Prototype of functions inputbooks and displaybooks differs from their call.
2.Call with the object instead of class name |
Forum: C++ Jan 5th, 2006 |
| Replies: 13 Views: 15,755 OOOOOOh....you'll be listening very soon from someone |
Forum: C++ Dec 16th, 2005 |
| Replies: 7 Views: 1,650 See The Changes...cin terminates with the first white character...don't mix C-headers with C++ one's....and why were you including iostream twice?
#include <iostream>
#include <cstdlib>
#include... |
Forum: C++ Dec 11th, 2005 |
| Replies: 11 Views: 1,845 Are u using file handling?? |
Forum: C++ Nov 29th, 2005 |
| Replies: 3 Views: 2,282 It sounds like homework....post what you have done till now and ask specific question regarding that code |
Forum: C++ Nov 25th, 2005 |
| Replies: 11 Views: 1,883 Go to
http://www.bloodshed.net/devcpp.html |
Forum: C++ Nov 17th, 2005 |
| Replies: 19 Views: 2,449 Codes compiles with no errors but gives warning bcoz ur using deprecated headers...dunno about ur logic maybe some logical errors also.... |
Forum: C++ Nov 17th, 2005 |
| Replies: 19 Views: 2,449 Sorry for that...i should have checked that before posting...i have always used <climits>.....yes<limits> is a standard header and works fine in DEV...so better post ur code |
Forum: C++ Nov 17th, 2005 |
| Replies: 19 Views: 2,449 Use <climits> instead of <limits>...there is typing mistake there
and plz see this
http://www.bloodshed.net/faq.html |
Forum: C++ Nov 17th, 2005 |
| Replies: 19 Views: 2,449 See This
http://www.daniweb.com/techtalkforums/thread33624.html |
Forum: C++ Nov 14th, 2005 |
| Replies: 2 Views: 1,867 if you want to input numbers then why are you trying to open a file in a program.
Make a file name input.txt in your f: drive and add the required data to it....
Here is the code for sum...rest do... |
Forum: C++ Oct 12th, 2005 |
| Replies: 8 Views: 2,486 Hi dave i am not denying that...i am just saying that my program doesn't give any error if i don't include cstdlib(in devc++)...works fine with only <iostream> |
Forum: C++ Oct 10th, 2005 |
| Replies: 8 Views: 2,486 Hi dave...i do agree tht its pretty backward step.....
how about using getch() using #include<conio.h>
and i am using DEV C++ 4.9.9.2...it doesn't require any header for system("pause")..it works... |
Forum: C++ Oct 9th, 2005 |
| Replies: 8 Views: 2,486 #include <iostream>
#include <limits>
using namespace std;
int main()
{
// Your code here |
Forum: C++ Sep 20th, 2005 |
| Replies: 10 Views: 2,408 I did tried your code..its working fine |
Forum: C++ Sep 20th, 2005 |
| Replies: 15 Views: 2,343 Your code should be like this...if not...then i am not getting you
hangman::hangman( char * surname)
{
int len=strlen(surname);
name = new char[len+1];
encryption = new... |
Forum: C++ Sep 20th, 2005 |
| Replies: 15 Views: 2,343 2 Things
---------
First...why are you passing size in constructor...you can calculate it inside the constructor since you are already passing the string itself
Second...I don't see any cout... |
Forum: C++ Sep 20th, 2005 |
| Replies: 15 Views: 2,343 What do you mean it doesn't get called....it will get called automatically when you declare an object...and you can't call it explicitly.....and it doesn't matter how many cout statements you put in... |
Forum: C++ Sep 20th, 2005 |
| Replies: 15 Views: 2,343 I guess this should work
hangman::hangman( char * surname, int size)
{
name = new char[size];
encryption = new char[size];
int len=strlen( name ) ;
strcpy(name,surname); |
Forum: C++ Sep 20th, 2005 |
| Replies: 15 Views: 2,343 Why is it out of bounds...i am saying one more space for null character |
Forum: C++ Sep 20th, 2005 |
| Replies: 15 Views: 2,343 You need to allocate one more space for null character.....
and after for loop add this line
encryption[45]='\0''; |
Forum: C++ Sep 13th, 2005 |
| Replies: 2 Views: 1,243 please tell us more about your code
how have u declared temp....defination of pop() function |