Search Results

Showing results 1 to 40 of 59
Search took 0.34 seconds.
Search: Posts Made By: server_crash ; Forum: C++ and child forums
Forum: C++ Aug 12th, 2006
Replies: 10
Views: 5,148
Posted By server_crash
You know of a C++ book that goes over that stuff in detail?




I prefer Brad Jones' "Teach yourself C++ in 24 days".... In my opinion it covers material better than any other C++ book I've...
Forum: C++ Jul 18th, 2006
Replies: 4
Views: 1,111
Posted By server_crash
I think it depends on the type of application. Java is similar to C++ in style, but you'll notice a speed difference on desktop apps right quick ;) I'd recommend going for .NET unless you're doing...
Forum: C++ Jul 7th, 2006
Replies: 1
Views: 1,862
Posted By server_crash
Bjarne's book 'The C++ Programming Language". It has PLENTY of tough exercises at the end of each chapter. Some of them aren't exactly easy.
Forum: C++ Jun 4th, 2006
Replies: 5
Views: 3,447
Posted By server_crash
Passing arrays is always a pain. I like how Dave just kept it in the public member section... Works out easier that way.
Forum: C++ May 13th, 2006
Replies: 11
Views: 2,727
Posted By server_crash
I thought about dropping to the command line and using JEdit.
Forum: C++ May 12th, 2006
Replies: 11
Views: 2,727
Posted By server_crash
I use Dev-C++ which does well with compiling, but I don't like the indentation mechanism of it. It doesn't properly align everything like it should...
Forum: C++ Apr 30th, 2006
Replies: 1
Views: 1,294
Posted By server_crash
I would use a map, definately. Create the map and then when you go to insert something, it would be like this:

map.insert( make_pair("Dog","Big fury animal") );

That's how I would do it, but...
Forum: C++ Apr 2nd, 2006
Replies: 4
Views: 955
Posted By server_crash
#include <windows.h>

Beep(int, int);
Forum: C++ Apr 2nd, 2006
Replies: 10
Views: 1,371
Posted By server_crash
There's no relation. You can make about any object simulate a simple physics vector, but a C++ vector is just a container. If the name was different would you still think there's a relationship?
Forum: C++ Apr 2nd, 2006
Replies: 12
Views: 2,214
Posted By server_crash
If you already know the syntax then do something mathematical that requires some thought and time to make. For instance: Maybe something simple to compute derivatives or an equation parser. A...
Forum: C++ Mar 31st, 2006
Replies: 16
Views: 2,044
Posted By server_crash
Wow. Your stupidity becomes more prevalent with each post. I know you're still pissed about me letting you know how stupid your other post is, but that's not reason to carry over into someone...
Forum: C++ Mar 30th, 2006
Replies: 16
Views: 2,044
Posted By server_crash
You haven't even got the user input.

set up variables properly:

int k = 0;
int n = 0;


prompt the user:
Forum: C++ Mar 14th, 2006
Replies: 5
Views: 2,745
Posted By server_crash
I can see how you might have one class and one 'driver' program, but I don't understand why you would want more than one class.

You could create, of course, a roman numeral class:


class...
Forum: C++ Jan 23rd, 2006
Replies: 6
Views: 34,130
Posted By server_crash
Not that it's important or anything, but you can initialize all the elements to a specific value:

vector< vector< double > > matrix( row, vector<double>(row, int_val));
Forum: C++ Jan 21st, 2006
Replies: 6
Views: 4,990
Posted By server_crash
It was actually my first choice to use strings. I would MUCH rather use them over char arrays, but all in all it was good practice, I guess. The reason I used char arrays is because it's the only...
Forum: C++ Jan 20th, 2006
Replies: 6
Views: 4,990
Posted By server_crash
No, this was a different problem. I'm using an older version of bloodshed and it as some really weird lock on files, so once I switched over it worked fine.
Forum: C++ Jan 20th, 2006
Replies: 6
Views: 4,990
Posted By server_crash
I have a program that reads from a file, but for some reason it never reaches the end of the file or something, because the loop never ends. I put only 2 lines of text in the file, and a loop like...
Forum: C++ Jan 10th, 2006
Replies: 3
Views: 2,307
Posted By server_crash
Don't worry yourself about creating the spaces and aligning into a triangle.... Thanks to C++ you can set the width and fill character of the output ;)
Forum: C++ Jan 9th, 2006
Replies: 8
Views: 1,448
Posted By server_crash
Alright, it worked. Thanks for all the help guys.

PS: Why would a compiler have problems with a double like that?
Forum: C++ Jan 9th, 2006
Replies: 8
Views: 1,448
Posted By server_crash
Yeah, I'm downloaded the very latest version right now. I'll let you know how it goes.
Forum: C++ Jan 9th, 2006
Replies: 8
Views: 1,448
Posted By server_crash
I'm using an older version of Bloodshed. I guess that could be the problem...... But if it works, then I will be extremememememmeemlllllyyyyyy happy.
Forum: C++ Jan 9th, 2006
Replies: 8
Views: 1,448
Posted By server_crash
cout << "determinant = " << determinant;

;)
Forum: C++ Jan 9th, 2006
Replies: 8
Views: 1,448
Posted By server_crash
This is my double:

double determinant = 2.8*5*-9.5;


It should print out -133, right?

It prints out some weird junk like: 1.8e + 04
Forum: C++ Dec 23rd, 2005
Replies: 11
Views: 7,150
Posted By server_crash
That's pretty sweet. I guess mine was blown way out of proportion.
Forum: C++ Dec 23rd, 2005
Replies: 11
Views: 7,150
Posted By server_crash
This is my try at it. It may not be very good, but it works.


#include <iostream>
#include <algorithm>
#include <string>
#include <set>
using std::cout;
using std::endl;
Forum: C++ Dec 23rd, 2005
Replies: 11
Views: 7,150
Posted By server_crash
Why not use a Set and specify the string size as a sorting criterion? That way, when you want to find the longest or shortest string it would be a one liner.
Forum: C++ Dec 23rd, 2005
Replies: 12
Views: 1,996
Posted By server_crash
Here's your problem:

cust.check_type(type,balance);

You're calling that method on a vector?
Forum: C++ Dec 1st, 2005
Replies: 1
Views: 1,645
Posted By server_crash
Try:

cout << "\\" << (an expression) << "\\";

\ is an escape sequence, so you must treat it with extra care.
Forum: C++ Nov 26th, 2005
Replies: 15
Views: 4,732
Posted By server_crash
If you're working with strings this might work (not tested), but it looks like dragons solution is probably what your looking for.


bool find_string(ifstream& file, const string& search)
{
...
Forum: C++ Nov 21st, 2005
Replies: 6
Views: 1,660
Posted By server_crash
So what's your question? I see nothing but a bunch of code in need of a few band aids, but no question.
Forum: C++ Nov 16th, 2005
Replies: 4
Views: 3,039
Posted By server_crash
Forum: C++ Nov 15th, 2005
Replies: 2
Views: 1,417
Posted By server_crash
If I remember right, the vector class is very slow when inserting elements to the front, or any place except the back. So, if there is a method push_front() then you probably shouldn't use it.
Forum: C++ Nov 15th, 2005
Replies: 4
Views: 3,039
Posted By server_crash
I'd say no, but there's no way to tell. The best thing to do is ask your teacher/professor. You can always do both and that way you won't have to worry.
Forum: C++ Nov 13th, 2005
Replies: 5
Views: 1,240
Posted By server_crash
You could simply loop through I guess:

bool anyNegatives(int nums[], int size)
{
for (int i=0; i<size; ++i)
{
if (nums[i] < 0)
{
return true;
}
Forum: C++ Nov 5th, 2005
Replies: 4
Views: 1,942
Posted By server_crash
Oh, I see. I appreciate the help sunny.
Forum: C++ Nov 5th, 2005
Replies: 4
Views: 1,942
Posted By server_crash
Well, I knew that would work, but I'm trying to split functionality up as much as I can. Is there not a way to have this Store class as an external source code and import it into the Person class?...
Forum: C++ Nov 5th, 2005
Replies: 4
Views: 1,942
Posted By server_crash
I have a class Person and a Class Store. I didn't find any way to really inherit Store in class Person, so I created Class Store in a namespace called StoreClass.

In the person class this...
Forum: C++ Nov 4th, 2005
Replies: 9
Views: 1,748
Posted By server_crash
Ok, I think I got it. Correct me if I'm wrong:

The first parameter(ostream&) is actually on the right side of the operator << and the object it's operating on is on the right side of the <<...
Forum: C++ Nov 4th, 2005
Replies: 9
Views: 1,748
Posted By server_crash
Thanks guys, that really helped a lot and cleared things up. It turned out that I didn't declare it as a friend. Now, one thing I don't understand is where the ostream& is passed since it's the...
Forum: C++ Nov 3rd, 2005
Replies: 9
Views: 1,748
Posted By server_crash
I have the following code:


ostream Person::operator<<(ostream& out, const Person& p)
{
out << "/n*********************************" << endl;
out << "Name: " <<...
Showing results 1 to 40 of 59

 


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

©2003 - 2009 DaniWeb® LLC