Search Results

Showing results 1 to 40 of 96
Search took 0.17 seconds.
Search: Posts Made By: ~s.o.s~ ; Forum: C++ and child forums
Forum: C++ Jul 19th, 2007
Replies: 6
Views: 19,264
Posted By ~s.o.s~
Bench has given a good suggestion. But if you are not allowed to use maps, try using two parallel string arrays in which the location of the name of the animal and its description resides in the same...
Forum: C++ Jul 19th, 2007
Replies: 7
Solved: Quick question
Views: 895
Posted By ~s.o.s~
Mauro, more than 30 posts and you still don't use code tags?
Forum: C++ Jul 19th, 2007
Replies: 6
Views: 9,395
Posted By ~s.o.s~
> Why?
Answer. (http://www.daniweb.com/forums/post191618-8.html)
Forum: C++ Jul 16th, 2007
Replies: 62
Solved: Permutation
Views: 11,452
Posted By ~s.o.s~
Dump the loops, what you need is a recursive algorithm which would work for arbitrary lengths of arrays. One of the way is using 'Heap Permute'. Here is a sample program which you can easily adapt to...
Forum: C++ Jul 4th, 2007
Replies: 9
Views: 2,481
Posted By ~s.o.s~
You end up removing the fourth character instead of the third one. Doing if(i % 3 == 2) would solve the problem.

But I still think that removing third character from each _word_ is different from...
Forum: C++ Jun 25th, 2007
Replies: 14
Views: 1,387
Posted By ~s.o.s~
Here (http://norvig.com/21-days.html) is something for those people who think that 'Teach yourself xxx in yy days' can do them any good..
Forum: C++ Jun 21st, 2007
Replies: 9
Views: 3,128
Posted By ~s.o.s~
> I have the basic knowledge in C++ and C.
Better start off with some console based games. They would help you in concentrating on the logical aspects of the game without wasting your time in...
Forum: C++ Jun 12th, 2007
Replies: 5
Views: 20,085
Posted By ~s.o.s~
A common solution to this problem is to pass around the array size along with the array. That way, it would work for all types of arrays, not just C style strings (char arrays with terminating null...
Forum: C++ May 22nd, 2007
Replies: 14
Views: 3,587
Posted By ~s.o.s~
> So, multitasking is a more simple concept of multithreading?
Mutitasking is what your operating systems are packed with. You have the ability to execute more than one tasks / processes. You can...
Forum: C++ Mar 19th, 2007
Replies: 11
Views: 2,194
Posted By ~s.o.s~
Maybe something like this:


double factorial (double value)
{
double result = 1.0;
while (fabs (value) > 0)
{
result *= value--;
}
Forum: C++ Mar 19th, 2007
Replies: 11
Views: 2,194
Posted By ~s.o.s~
Maybe you need to look a bit harder at the code I posted. It takes care of changing the flag variable. Look out for the part posted in bold...
Forum: C++ Mar 13th, 2007
Replies: 10
Solved: Code analysis
Views: 2,134
Posted By ~s.o.s~
You can save iterations and the additional checking performed in the loops by doing something like:


#include <iostream>

int main ()
{
using namespace std ;

int limit = -1, count...
Forum: C++ Mar 9th, 2007
Replies: 6
Views: 8,594
Posted By ~s.o.s~
I guess I did post a similar code (http://www.daniweb.com/techtalkforums/post326797-9.html) in another thread.... ;)
Forum: C++ Feb 3rd, 2007
Replies: 10
Views: 3,854
Posted By ~s.o.s~
...which even can be solved with a really simple loop.

Since the langugages in which we program are normally turing complete, there is as such nothing which can only be solved using recursion. A...
Forum: C++ Feb 2nd, 2007
Replies: 9
Poll: C++ vs. VB
Views: 2,194
Posted By ~s.o.s~
Categorization is for the weak minded people who need a reason to learn a lanaguage. Programming is an art and language are the tools for artists.

Of course if given a problem domain and the...
Forum: C++ Jan 20th, 2007
Replies: 24
Views: 65,717
Posted By ~s.o.s~
Hello to all programmers out there. Considering the growing request for practice problems by the beginners, we ( Me, Joey, Niek, Aaron..) have decided to start a sticky which will host some common...
Forum: C++ Jan 7th, 2007
Replies: 25
Views: 3,835
Posted By ~s.o.s~
I don't know Mr. Jobe if you already know this but there is a book which presents the solutions to the problems posed in C++ Programming Language, you can get it here...
Forum: C++ Jan 2nd, 2007
Replies: 11
Views: 2,695
Posted By ~s.o.s~
Ravalon, have you enabled all the warnings in your compiler settings (-Wall) since the above flags a warning saying "error: no matching function for call to `random_shuffle(<anonymous struct>[52],...
Forum: C++ Dec 23rd, 2006
Replies: 14
Views: 3,687
Posted By ~s.o.s~
Its actually the reverse, delete will remove or deallocate the data pointed by new and not delete the pointer. Simply put, will send the portion of allocated memory to the free store.
It is...
Forum: C++ Dec 18th, 2006
Replies: 3
Views: 3,762
Posted By ~s.o.s~
I don't blame you, since what you encountered is one of the C++ gotchas and not many starters know about it.

What you are trying to do here is to create a function which will befriend all the...
Forum: C++ Dec 8th, 2006
Replies: 10
Views: 1,978
Posted By ~s.o.s~
Hello.

Actual arrays can't be resized, what you are talking about is data pointers being allocated enough memory to be used as arrays.

The important differentiation here being used as arrays...
Forum: C++ Dec 5th, 2006
Replies: 10
Views: 2,261
Posted By ~s.o.s~
Hmm...here is what I think you should do:

1. Always keep a guard condition while making header files which does away with the problem of recursive inclusion of headers. Something like:

#ifndef...
Forum: C++ Nov 23rd, 2006
Replies: 28
Views: 3,644
Posted By ~s.o.s~
Keep tab or print out the array after each iteration to give yourself a better understanding of what exactly is going on.

BTW your first swap function doesnt do anything, I'll leave it to you to...
Forum: C++ Nov 19th, 2006
Replies: 9
Views: 1,613
Posted By ~s.o.s~
I have read this somewhere in the context of Processor architecture. The compiler tries to align the data and the pointers along the boundaries i.e. in multiples of 4.

So the addresses are given...
Forum: C++ Nov 1st, 2006
Replies: 8
Views: 2,818
Posted By ~s.o.s~
Naa you aint defining the default constructor, you are just declaring it in Complex.h but its defination doesnt occur in Complex.cpp, thats the whole root of the problem.

Implement one in...
Forum: C++ Oct 31st, 2006
Replies: 48
Views: 8,757
Posted By ~s.o.s~
Okay buddy, what exactly your intension is ? You have been recommended books in the prevoius posts by Mr. Dragon and Mr. Joe. Refer the previous posts for answer to your question.

I'll tell you a...
Forum: C++ Sep 29th, 2006
Replies: 9
Views: 1,673
Posted By ~s.o.s~
If you have a dilemma post the real question to your dilemma instead of being vague all over. And whats up with this kind of attitude? Maintain it and you would be sure to make a lot many friends...
Forum: C++ Sep 29th, 2006
Replies: 5
Views: 2,733
Posted By ~s.o.s~
Try out something like:


#ifndef SAVINGSACCOUNT1_H
#define SAVINGSACCOUNT1_H

class SavingsAccount
{
private:
float annualInterestRate;
Forum: C++ Sep 29th, 2006
Replies: 10
Views: 2,779
Posted By ~s.o.s~
If you want the program to recover the files which you deleted by mistake then you are posting in the wrong forum but still can take a look here:
...
Forum: C++ Sep 28th, 2006
Replies: 6
Views: 3,214
Posted By ~s.o.s~
Yes its possible I may be wrong but lookign from his code and the limited senario he has painted in front of me, i thought maybe he didnt know about preorder and needed some direction. But then again...
Forum: C++ Sep 28th, 2006
Replies: 2
Views: 1,096
Posted By ~s.o.s~
The things marked in red by me are the culprits. WHy dont u format the code properly so that typographic errors will be minimised. Do you write your code in Notepad. If so grab your self a syntax...
Forum: C++ Sep 27th, 2006
Replies: 6
Views: 2,822
Posted By ~s.o.s~
I think you are getting the formulas for deviation and variace wrong.

See this code for reference;


#include <iostream>
#include<iomanip>
#include <cmath>
using namespace std;
Forum: C++ Sep 27th, 2006
Replies: 6
Views: 2,822
Posted By ~s.o.s~
I think you gettting the fundamentals of programming wrong. Why you taking in the number of elements entered by the user into an array. Why not just use a simple int variable like "total_numbers".
...
Forum: C++ Sep 27th, 2006
Replies: 6
Views: 2,304
Posted By ~s.o.s~
Since i dont know a lot about all this i cant say anything definate but here are some of the links realted to CURSORS and Oracle and mysql.

http://www.sqlapi.com/Examples/refcursors.cpp...
Forum: C++ Sep 26th, 2006
Replies: 5
Views: 5,662
Posted By ~s.o.s~
Please explain the problem clearly so that we can help you out. Post your entire code along with the problems you are encountering.. whether it is compile time error or run time error or the program...
Forum: C++ Sep 26th, 2006
Replies: 12
Views: 2,112
Posted By ~s.o.s~
What have you attempted till now, post it here so that we can set your logic right and make you understand things more clearly.
Forum: C++ Sep 26th, 2006
Replies: 6
Views: 2,304
Posted By ~s.o.s~
Dont know what exactly you want but if you want some tuts on interfacign MySQL and C you can visit some of the links given below:

http://www.tol.it/doc/MySQL/...
Forum: C++ Sep 25th, 2006
Replies: 12
Views: 2,112
Posted By ~s.o.s~
Hmm looks like your basics are a bit err.. shaky. You got most of the syntax there wrong. Why not revist the basics by learning something about C++ with good books. Some tuts here...
Forum: C++ Sep 25th, 2006
Replies: 1
Views: 880
Posted By ~s.o.s~
What kind of optimization do you want to perform on this code, performance wise or lengthwise ? Please be more specific.
Forum: C++ Sep 23rd, 2006
Replies: 11
Views: 2,003
Posted By ~s.o.s~
Maybe you can try out something of this sort and make it more robust and suiting to your own purpose.


using namespace std;
int main()
{
int number=10;
int your_number;
char...
Showing results 1 to 40 of 96

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC