Search Results

Showing results 1 to 40 of 138
Search took 0.01 seconds.
Search: Posts Made By: Sturm ; Forum: C++ and child forums
Forum: C++ Jul 31st, 2009
Replies: 11
Views: 489
Posted By Sturm
y-intercept? What?
y = mx + b is a linear function. What are these 'four ys' and 'four xs'?
Forum: C++ Feb 12th, 2008
Replies: 7
Views: 627
Posted By Sturm
it should read: cout << "yarg!" << endl; instead.
Forum: C++ Feb 12th, 2008
Replies: 11
Views: 964
Posted By Sturm
>What medium do you want to draw it on...

Considering his lack of information, I think it's safe to assume the medium is a terminal.

I repeat, you must draw it yourself.
Forum: C++ Feb 12th, 2008
Replies: 11
Views: 964
Posted By Sturm
You must draw it "bymyself."
Forum: C++ Jan 27th, 2008
Replies: 7
Views: 2,315
Posted By Sturm
The = is an assignment operator. Use == instead. Your code would still need some fixing, but I'm sure you can figure that out.
Forum: C++ Dec 11th, 2007
Replies: 13
Views: 5,007
Posted By Sturm
You realize these are just DOS commands? Oh and btw, none of your commands work on *my* computer, I wonder why that is.
Forum: C++ Dec 2nd, 2007
Replies: 2
Views: 2,268
Posted By Sturm
Oh wow, I feel stupid.
Forum: C++ Dec 2nd, 2007
Replies: 2
Views: 2,268
Posted By Sturm
For homework I'm apparently supposed to implement some functions defined in <algorithm> . So this is what I have so far:

template <class I> bool m_equal( I b, I e, I b2 ) ...
Forum: C++ Nov 27th, 2007
Replies: 5
Views: 1,458
Posted By Sturm
Or a little little easier:

int round(const double& c)
{
if (c - (int)c > .5)
return (int)c + 1;
else
return (int)c;
}
Forum: C++ Nov 26th, 2007
Replies: 5
Views: 1,223
Posted By Sturm
Why are you using graphics.h ? Real programmers(tm) use a real API such as SDL, Allegro, or ClanLib.
Forum: C++ Nov 22nd, 2007
Replies: 3
Views: 801
Posted By Sturm
1. Get a better compiler. (Dev-Cpp (http://www.bloodshed.net/devcpp.html), Code::Blocks (http://www.codeblocks.org/))
2. Get a better graphics API. (SDL (http://www.libsdl.org/), ALLEGRO...
Forum: C++ Nov 21st, 2007
Replies: 8
Views: 1,705
Posted By Sturm
Why are you erasing anything in the first place?
here's the idea:

1. Increment an iterator until isspace() is false.
2. Increment another iterator until isspace() is true. You now have a word....
Forum: C++ Nov 21st, 2007
Replies: 8
Views: 1,705
Posted By Sturm
Forum: C++ Nov 21st, 2007
Replies: 8
Views: 1,705
Posted By Sturm
Instead of doing all this crap with the string, why not just create a new string? isspace() is your friend.
Forum: C++ Nov 21st, 2007
Replies: 5
Views: 620
Posted By Sturm
So what's the problem? (besides your bad code)
Forum: C++ Nov 15th, 2007
Replies: 13
Views: 1,194
Posted By Sturm
>ill take a look at Acceralted C++ - i dont like the "in 21 days" books - the only one of them which i ever got on with was the SQL one, that was excellent

I bought accelerated c++ a few months (I...
Forum: C++ Nov 10th, 2007
Replies: 9
Views: 656
Posted By Sturm
>Num goes in here??

If num goes there, why did you pass b , an uninitialized variable with a random value?
Forum: C++ Nov 10th, 2007
Replies: 9
Views: 656
Posted By Sturm
Do you know what a scope is?

Your getFib() function can't magically get variable values from your main function.
Forum: C++ Nov 10th, 2007
Replies: 9
Views: 656
Posted By Sturm
Since b is unitialized, the value of b could be *anything.*

>But the main problem I have is that when num goes to getFib() it becomes a very strange number thats nothing close to what I input to...
Forum: C++ Nov 10th, 2007
Replies: 9
Views: 656
Posted By Sturm
Well... what seems to be wrong with these 2 lines:


long double b;
getFib(b);
Forum: C++ Nov 8th, 2007
Replies: 13
Views: 3,377
Posted By Sturm
You could turn off terminal echoing.
Forum: C++ Oct 26th, 2007
Replies: 9
Views: 2,535
Posted By Sturm
Were you using devpaks? If not, I suggest you try it as generally it's quite easy to install devpak libraries. http://devpaks.org/category.php?category=SDL
Forum: C++ Oct 21st, 2007
Replies: 5
Views: 740
Posted By Sturm
Forum: C++ Oct 21st, 2007
Replies: 5
Views: 740
Posted By Sturm
First of all, you should use classes. In addition to this you should use vectors instead of strings. And third, you should make your program platform inpedendent. This means not using system() .
...
Forum: C++ Oct 21st, 2007
Replies: 6
Views: 2,035
Posted By Sturm
for ( int c = 7; c < i; c += 2)
cout << c << "\n";
Forum: C++ Oct 14th, 2007
Replies: 10
Views: 6,392
Posted By Sturm
Forum: C++ Oct 8th, 2007
Replies: 2
Views: 1,250
Posted By Sturm
I don't believe so, but there is a C compiler (http://hpgcc.org/) for the hp-50g (A much superior calculator if I may interject my own opinion)
Forum: C++ Oct 8th, 2007
Replies: 3
Views: 1,764
Posted By Sturm
Let me guess: Your using visual c++ 6 and some subpar textbook that uses outdated headers. The class is taught by some loser who is too stupid to get a real job actually programming. In fact judging...
Forum: C++ Oct 2nd, 2007
Replies: 5
Views: 2,322
Posted By Sturm
You need to seed rand. srand (time(0)) ( it uses ctime I think so include that)
Forum: C++ Oct 1st, 2007
Replies: 14
Views: 1,507
Posted By Sturm
Are most computer science professors that incompetent?
Forum: C++ Oct 1st, 2007
Replies: 14
Views: 1,507
Posted By Sturm
Airline homework problem? Whats that?
Forum: C++ Sep 17th, 2007
Replies: 3
Views: 658
Posted By Sturm
output:

cout << "Hello, World\n"; // '\n' returns the line

input:

cin >> var1; //sets var1 to the user input (most of the time)
Forum: C++ Sep 17th, 2007
Replies: 18
Views: 1,562
Posted By Sturm
Forum: C++ Sep 17th, 2007
Replies: 18
Views: 1,562
Posted By Sturm
just use Ancient Dragon's code but replace Sleep(1000) with Sleep(90000).
Forum: C++ Sep 16th, 2007
Replies: 2
Views: 863
Posted By Sturm
use sdl_mixer.
Forum: C++ Sep 16th, 2007
Replies: 18
Views: 1,562
Posted By Sturm
while(true)
{
system("<yourcommand here>");
Sleep(90000);//have to include windows.h I think
}
Forum: C++ Sep 16th, 2007
Replies: 5
Views: 795
Posted By Sturm
You should probably just create a struct that stores the name of the person and their score. Then store the the bowler struct in a vector.
Forum: C++ Sep 9th, 2007
Replies: 6
Views: 3,846
Posted By Sturm
-Id:/dev-c++/include/gtkmm-2.4
-Id:/dev-c++/lib/gtkmm-2.4/include
-Id:/dev-c++/include/gtk-2.0
-Id:/dev-c++/lib/sigc++-2.0/include
-Id:/dev-c++/include/sigc++-2.0
...
Forum: C++ Sep 8th, 2007
Replies: 6
Views: 3,846
Posted By Sturm
Try rebooting to update your path (I don't have access to a windows machine currently). If that doesn't work you could manually locate all of the necessary files.
Forum: C++ Sep 8th, 2007
Replies: 6
Views: 3,846
Posted By Sturm
http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ape.html

What doesn't work?
Showing results 1 to 40 of 138

 


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

©2003 - 2009 DaniWeb® LLC