Forum: C++ Feb 16th, 2008 |
| Replies: 10 Views: 1,262 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: 507 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,174 Like Larry Wall said:
"Make simple things easy." |
Forum: C Aug 29th, 2007 |
| Replies: 17 Views: 2,273 Since some compilers (and lint) will warn about discarded return values, an explicit cast to (void) is a way of saying "Yes, I've decided to ignore the return value from this call. |
Forum: C Aug 28th, 2007 |
| Replies: 17 Views: 2,273 This would be better
printf("Hit 'ENTER' to exit\n");
fflush(stdout);
(void)getchar(); |
Forum: C++ Aug 23rd, 2007 |
| Replies: 3 Views: 1,978 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,920 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,704 Just take typedef int value_type; out of class. Things should work. |
Forum: C Aug 19th, 2007 |
| Replies: 5 Views: 3,599 In case char *name="Yankee Duddle"; string literal turns into an unnamed, static array of characters, and this unnamed array may be stored in read-only memory, and which therefore cannot necessarily... |
Forum: C++ Dec 23rd, 2006 |
| Replies: 15 Views: 3,763 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,695 Visual Leak Detector (http://www.codeproject.com/tools/visualleakdetector.asp) |
Forum: C++ May 24th, 2006 |
| Replies: 7 Views: 1,488 #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,488 Are you sure your code works fine?? |
Forum: C May 23rd, 2006 |
| Replies: 3 Views: 1,049 I think if possible you should go as local as you can keeping in mind memory.
As far as processing power is concerned, you should'nt care unless you are working on a system having limited amount... |
Forum: C++ May 23rd, 2006 |
| Replies: 5 Views: 1,490 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,490 Only one case will be executed. |
Forum: C++ May 23rd, 2006 |
| Replies: 4 Views: 4,975 Read this
http://www.parashift.com/c++-faq-lite/intrinsic-types.html |
Forum: C++ May 20th, 2006 |
| Replies: 8 Views: 2,608 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 Apr 30th, 2006 |
| Replies: 4 Views: 1,652 See srand (http://www.cppreference.com/stdother/srand.html) and rand (http://www.cppreference.com/stdother/rand.html) |
Forum: C++ Jan 18th, 2006 |
| Replies: 12 Views: 2,406 beuls use [] instead of <> for code tags |
Forum: C++ Jan 17th, 2006 |
| Replies: 2 Views: 1,661 Replace your headers with these
#include <sstream>
#include <string>
#include<iostream> |
Forum: C++ Jan 17th, 2006 |
| Replies: 2 Views: 12,013 Visit
http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1046996179&id=1043284385 |
Forum: C++ Jan 15th, 2006 |
| Replies: 6 Views: 1,781 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: 6 Views: 2,623 I would recommend you to read this tutorial
http://www.cprogramming.com/tutorial/cfileio.html |
Forum: C Jan 5th, 2006 |
| Replies: 6 Views: 2,623 We don't use this...we use
rewind(in);
Are you sure about what you are asking...if yes, please make it more clear |
Forum: C++ Jan 5th, 2006 |
| Replies: 13 Views: 15,849 OOOOOOh....you'll be listening very soon from someone |
Forum: C++ Dec 16th, 2005 |
| Replies: 7 Views: 1,652 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,847 Are u using file handling?? |
Forum: C++ Nov 29th, 2005 |
| Replies: 3 Views: 2,301 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,885 Go to
http://www.bloodshed.net/devcpp.html |
Forum: C++ Nov 17th, 2005 |
| Replies: 19 Views: 2,454 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,454 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,454 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,454 See This
http://www.daniweb.com/techtalkforums/thread33624.html |
Forum: C++ Nov 14th, 2005 |
| Replies: 2 Views: 1,870 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,493 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,493 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,493 #include <iostream>
#include <limits>
using namespace std;
int main()
{
// Your code here |
Forum: C++ Sep 20th, 2005 |
| Replies: 10 Views: 2,410 I did tried your code..its working fine |
Forum: C++ Sep 20th, 2005 |
| Replies: 15 Views: 2,351 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... |