User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 402,489 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,822 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 40 of 500
Search took 0.04 seconds.
Posts Made By: SpS
Forum: C++ Feb 22nd, 2008
Replies: 2
Views: 1,225
Posted By SpS
Re: Dynamic stack in c++

Why are you taking pain by handling memory yourself. Use power of STL.
#include <vector>
#include <stdexcept>

template <typename T>
class Stack
{
private:
std::vector<T> elems; // elements
Forum: C++ Feb 20th, 2008
Replies: 6
Views: 416
Posted By SpS
Re: template class question

The reason for linker error is that the definition of the function template has not been instantiated. In order for a template to be instantiated, the compiler must know which definition should be...
Forum: C++ Feb 18th, 2008
Replies: 5
Views: 624
Posted By SpS
Re: operator overload

If you would have been given an options to implement operator++() which would work for both versions of ++, how would you do it?
You need to find some way to distinguish between both of them.
Forum: C++ Feb 16th, 2008
Replies: 1
Views: 252
Posted By SpS
Re: tutorials needed!

Best way would be to get a book. Some of the recommendations http://www.daniweb.com/forums/thread70096.html

One online tutorial
http://www.cplusplus.com/doc/tutorial/
Forum: C++ Feb 16th, 2008
Replies: 10
Views: 690
Posted By SpS
Re: MultiDimension Array help

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: 6
Views: 467
Posted By SpS
Re: void main() and int main()

Another link void main(void) - the Wrong Thing (http://users.aber.ac.uk/auj/voidmain.shtml)
Forum: C++ Feb 16th, 2008
Replies: 1
Views: 234
Posted By SpS
Re: Array help!

Function call operator is () not []. There are few undeclared variables and some variables with incorrect names.
Forum: C++ Feb 16th, 2008
Replies: 3
Views: 300
Posted By SpS
Re: program in c++

/ and % can come handy.
Forum: C++ Feb 14th, 2008
Replies: 7
Views: 1,273
Posted By SpS
Re: Remove extra whitespace

Like Larry Wall said:

"Make simple things easy."
Forum: C++ Sep 1st, 2007
Replies: 4
Views: 761
Posted By SpS
Re: Exception Handling

Here's another tutorial (http://www.cplusplus.com/doc/tutorial/exceptions.html)
Forum: C++ Sep 1st, 2007
Replies: 13
Views: 872
Posted By SpS
Re: Need Help!!!

Also correct the way you use exception handling in code.
Forum: C++ Sep 1st, 2007
Replies: 5
Views: 1,300
Posted By SpS
Re: difference between pointers and handles

The term handle is used to mean any technique that lets you get to another object — a generalized pseudo-pointer. The term is (intentionally) ambiguous and vague.

Read more...
Forum: C Aug 29th, 2007
Replies: 17
Views: 1,317
Posted By SpS
Re: Stupid Question

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: 1,317
Posted By SpS
Re: Stupid Question

This would be better

printf("Hit 'ENTER' to exit\n");
fflush(stdout);
(void)getchar();
Forum: C++ Aug 27th, 2007
Replies: 16
Views: 1,976
Posted By SpS
Re: How to clear a string

const char *str="SpS";
cout << str;
str = NULL;
Forum: C Aug 27th, 2007
Replies: 3
Views: 733
Posted By SpS
Re: Dynamic Binding In C

Objective-C is a language based upon C, with a few additions that make it a complete, object-oriented language.
Objective-C is a language that implements true dynamic binding (which is required for...
Forum: C++ Aug 27th, 2007
Replies: 2
Views: 390
Posted By SpS
Forum: C++ Aug 27th, 2007
Replies: 15
Views: 924
Posted By SpS
Re: Please help newbie:

Take a look at http://en.wikipedia.org/wiki/Fibonacci_number
Forum: C++ Aug 27th, 2007
Replies: 4
Views: 3,150
Posted By SpS
Re: Creating two dimensional array

You could approach like this
#include <vector>

template <typename T>
class dynamic_array
{
public:
dynamic_array(){};
dynamic_array(int rows, int cols)
{
Forum: C++ Aug 27th, 2007
Replies: 9
Views: 1,597
Posted By SpS
Re: creating dynamic array

You can make use of vector<vector<T> >
Forum: C++ Aug 23rd, 2007
Replies: 3
Views: 615
Posted By SpS
Re: Downloading files from web address'

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 23rd, 2007
Replies: 3
Views: 823
Posted By SpS
Re: How To Write A Function

Help yourself by reading this (http://www.daniweb.com/forums/announcement8-2.html)
Forum: C Aug 22nd, 2007
Replies: 6
Views: 460
Posted By SpS
Re: Help on c

I would highly recommend CodeBlocks (http://www.codeblocks.org/)
Forum: C++ Aug 21st, 2007
Replies: 11
Views: 1,639
Posted By SpS
Re: int main or void main?

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 21st, 2007
Replies: 1
Views: 516
Posted By SpS
Re: C++ and MySql

Did you try Google. You can find loads of them.
Forum: C++ Aug 20th, 2007
Replies: 5
Views: 1,991
Posted By SpS
Re: How to convert very long string to a double???

You might try this http://gmplib.org/
Forum: C++ Aug 20th, 2007
Replies: 5
Views: 1,991
Posted By SpS
Re: How to convert very long string to a double???

You can even set the precision like this std::cout.precision(15);
Forum: C++ Aug 20th, 2007
Replies: 5
Views: 1,991
Posted By SpS
Re: How to convert very long string to a double???

You can use istringstream

#include <sstream>
#include <iostream>

int main()
{
std::istringstream stm;
double number;
Forum: C++ Aug 20th, 2007
Replies: 8
Views: 440
Posted By SpS
Re: Plz Solve this problem...

Read about Sequence Points (http://www.c-faq.com/expr/seqpoints.html)
Forum: C++ Aug 20th, 2007
Replies: 9
Views: 1,009
Posted By SpS
Re: private constructors

Yes, you can do this in main
TestPtr p(Test::create());

auto_ptr is a pointer-like object (a smart pointer) whose destructor automatically calls delete on what it points to as soon as scope ends...
Forum: C Aug 20th, 2007
Replies: 6
Views: 582
Posted By SpS
Re: Pointers

Read this
http://www.eternallyconfuzzled.com/tuts/languages/jsw_tut_pointers.aspx
Forum: C++ Aug 20th, 2007
Replies: 10
Views: 807
Posted By SpS
Re: problem with loop

That's incorrect. It was only required in C89/90. C++ never had such requirement. Even C99 removes this restriction.
Forum: C++ Aug 20th, 2007
Replies: 4
Views: 1,719
Posted By SpS
Re: How to sort alphabet

You can make use of qsort() or std::sort
Forum: C++ Aug 20th, 2007
Replies: 3
Views: 1,337
Posted By SpS
Re: syntax error before '::' token

Just take typedef int value_type; out of class. Things should work.
Forum: C++ Aug 20th, 2007
Replies: 9
Views: 1,009
Posted By SpS
Re: private constructors

You can provide static create() member functions which create the object using new and return a pointer to the allocated object.

typedef auto_ptr<Test> TestPtr;
TestPtr Test::create()...
Forum: C++ Aug 20th, 2007
Replies: 10
Views: 807
Posted By SpS
Re: problem with loop

There are plenty of problems in your code
1) You are using non-standard headers(iostraem.h,conio.h). You should be sticking to standard headers. You only require <iostream> in your code.
2)Implicit...
Forum: C++ Aug 19th, 2007
Replies: 10
Views: 807
Posted By SpS
Re: problem with loop

So, you are having trouble with language constructs or logic?
Forum: C Aug 19th, 2007
Replies: 14
Views: 2,745
Posted By SpS
Re: [Linux] Need a way to pause a program without using sleep

In C++, you can do something like this
#include <iostream>
#include <limits>

int main() {

// Rest of the code

//Clean the stream and ask for input
std::cin.ignore (...
Forum: C Aug 19th, 2007
Replies: 5
Views: 1,379
Posted By SpS
Re: Access Violation

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++ Aug 19th, 2007
Replies: 13
Views: 1,108
Posted By SpS
Re: library catalogue program

That's a linker error. It seems that you don't have defination of DisplayRecords().
Showing results 1 to 40 of 500

 
All times are GMT -4. The time now is 4:59 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC