Search Results

Showing results 1 to 40 of 209
Search took 0.02 seconds.
Search: Posts Made By: Ravalon
Forum: C++ Feb 14th, 2007
Replies: 8
Views: 4,171
Posted By Ravalon
I still don't think you're being clear enough. My example did that exactly. :confused:

That won't work with getline() because getline() trims the '\n'. The first character would be '\0' in a C...
Forum: C++ Feb 13th, 2007
Replies: 8
Views: 4,171
Posted By Ravalon
It depends on how you get the input, but you can check for an empty string with getline().

#include <iostream>
#include <string>


int main()
{
using namespace std;
Forum: IT Professionals' Lounge Feb 13th, 2007
Replies: 39
Views: 17,560
Posted By Ravalon
I ended up working on a VB6 app a few weeks ago. It reminded me why I like .NET so much. :cheesy: That's been happening a lot. VB6, SQL 2000, Visual Studio 2003, .NET 1.1... I've been spoiled by the...
Forum: IT Professionals' Lounge Feb 13th, 2007
Replies: 39
Views: 17,560
Posted By Ravalon
Stubborn VB programmers keep wanting to use VB.NET. ;)
Forum: Geeks' Lounge Feb 11th, 2007
Replies: 22
Views: 3,317
Posted By Ravalon
Oh, I supposed I'd best not change it then. ;)
Forum: IT Professionals' Lounge Feb 11th, 2007
Replies: 39
Views: 17,560
Posted By Ravalon
Change is the only constant in the programming field. :cheesy: Nobody can predict the future, so all we can do is pick what we think is best at the time and adjust as needed.
Forum: IT Professionals' Lounge Feb 11th, 2007
Replies: 39
Views: 17,560
Posted By Ravalon
I'll have to give it a try again, if only to save myself from making another conversational faux pas. ;) Thank you. :)
Forum: IT Professionals' Lounge Feb 11th, 2007
Replies: 39
Views: 17,560
Posted By Ravalon
I'm just being pedantic. :) Controlling a language suggests that rivals aren't allowed or can be broken by the dominant vendor making changes. That's a significant difference from being the only...
Forum: IT Professionals' Lounge Feb 11th, 2007
Replies: 39
Views: 17,560
Posted By Ravalon
I haven't used SharpDevelop in ages, and I've only read about Mono. So take my opinion from that perspective, but the last time I checked, they weren't even close to being considered rivals. If they...
Forum: Geeks' Lounge Feb 11th, 2007
Replies: 22
Views: 3,317
Posted By Ravalon
I present myself differently, but my personality is basically the same. Easy going, quiet except when I think I can make a difference, and nice enough to keep from making enemies. ;)

I guess I'm...
Forum: IT Professionals' Lounge Feb 11th, 2007
Replies: 39
Views: 17,560
Posted By Ravalon
Nor is C#. Both C# and CLI are internationally standardized. It's not Microsoft's fault that nobody has yet written an implementation that rivals .NET and Visual C#, is it? ;)
Forum: IT Professionals' Lounge Feb 11th, 2007
Replies: 39
Views: 17,560
Posted By Ravalon
That's the way I am most of the time, so I can see it easily. ;)

I really like the .NET framework, and that's coming from a hardcore Java background. It's not fair to suggest that .NET is bad just...
Forum: IT Professionals' Lounge Feb 11th, 2007
Replies: 39
Views: 17,560
Posted By Ravalon
I want that language too. :) C/C++ can be used for those things, but it's not always the best choice and I don't think of C/C++ when I think of rapid development.

I get the impression that you...
Forum: C++ Feb 11th, 2007
Replies: 2
Views: 2,531
Posted By Ravalon
I find it humorous that there was a google ad for aspartame resources just under tatumkay's post when I first read it. :lol:

That is all. You may now return to your regularly scheduled programming.
Forum: IT Professionals' Lounge Feb 11th, 2007
Replies: 39
Views: 17,560
Posted By Ravalon
I think every language is a good one to learn. :) The nasty secret of rapid development is that you can be efficient in any language with the right tools. C# is productive if you have Visual Studio...
Forum: IT Professionals' Lounge Feb 10th, 2007
Replies: 39
Views: 17,560
Posted By Ravalon
It's impossible to tell you the pros and cons without some sort of context. If it were possible then people like us wouldn't stress over what language to use. ;)

I agree that Visual Studio makes...
Forum: C++ Feb 10th, 2007
Replies: 5
Views: 1,314
Posted By Ravalon
Yes, C is a smart choice for a game developer. But so is C++, and any of a dozen other languages. ;) I understand that OOP is confusing. I had trouble with it at first too. Come to think of it, I...
Forum: C Feb 10th, 2007
Replies: 6
Views: 1,190
Posted By Ravalon
I guess it depends on how much detail you want with your cargo. Probably the best solution is to have a cargo class that can be constructed with an initial size.

class ShipCargo {
public:
...
Forum: C Feb 10th, 2007
Replies: 2
Views: 1,002
Posted By Ravalon
What was it? :)
Forum: C++ Feb 9th, 2007
Replies: 10
Views: 5,545
Posted By Ravalon
I fell into the trap of summarizing something very complex. :) The point is that most of the time you don't need to care. When you do need to care, you probably know that you need to care and how to...
Forum: C# Feb 9th, 2007
Replies: 4
Views: 6,827
Posted By Ravalon
Not always. The documentation should tell you what dll to load for dynamic linking and what *.lib file to use for static linking. The header file is for C and C++ only so that you can use libraries...
Forum: C# Feb 9th, 2007
Replies: 4
Views: 6,827
Posted By Ravalon
SetSuspendState() should be in PowrProf.dll, not User32.dll.

[DllImport("PowrProf.dll")]
public static extern bool SetSuspendState(bool Hibernate, bool ForceCritical, bool DisableWakeEvent);
Forum: C++ Feb 9th, 2007
Replies: 10
Views: 5,545
Posted By Ravalon
endl calls the flush() method of the stream. That means more work done per use, and it's a sure bet that endl is less efficient than '\n'. It's also a nearly sure bet that the difference isn't enough...
Forum: C++ Feb 9th, 2007
Replies: 6
Views: 2,217
Posted By Ravalon
That's the impression that I get. :) I'm not sure you can rely on it because the rules for friends shouldn't do that. A friend of mine is not necessarily a friend of my children. ;) But I don't claim...
Forum: C# Feb 9th, 2007
Replies: 1
Views: 1,417
Posted By Ravalon
I usually end up using a masked text box or text box for dates. The validation code can be packaged up into a nice reusable class, and my users don't have as much usability trouble. There's also...
Forum: C++ Feb 8th, 2007
Replies: 4
Views: 1,270
Posted By Ravalon
if ( choice1 = choice1 )

This will always be a true statement for two reasons. Firstly, the == operator is used to compare things, the = operator sets values. Secondly, comparing choice1 with...
Forum: C Feb 8th, 2007
Replies: 18
Views: 4,770
Posted By Ravalon
If fgets doesn't read a '\n', there are more characters in the stream. Just keep calling fgets and appending the result to your string until there is a '\n'. :) The tricky part is making sure that...
Forum: C++ Feb 8th, 2007
Replies: 16
Views: 3,321
Posted By Ravalon
I wish programming was like in films. I would love to be able to hack high security government systems in 60 seconds and save the world with a few keystrokes. And those 3D holographic UIs would be...
Forum: C Feb 8th, 2007
Replies: 18
Views: 4,770
Posted By Ravalon
Deceptively so, and that's the biggest problem. ;) Instead of making the effort of reading a line, parsing out the values that you want, and finally converting the strings into the desired types,...
Forum: C++ Feb 7th, 2007
Replies: 8
Views: 1,312
Posted By Ravalon
You have both a function and a local variable called power. The local variable hides the function name, and your compiler is telling you that your local variable can't be used as a function. :)
Forum: C++ Feb 6th, 2007
Replies: 11
Views: 2,325
Posted By Ravalon
Now I feel happy. Well, I felt happy before, but now I feel happier. Thank you. :)
Forum: Monitors, Displays and Video Cards Feb 6th, 2007
Replies: 0
Views: 766
Posted By Ravalon
I have a ATI Radeon X800 video card with a VGA and DVI output on a Windows XP MCE system. My primary LCD monitor is plugged into the VGA connector and my secondary LCD monitor is plugged into the DVI...
Forum: DaniWeb Community Feedback Feb 6th, 2007
Replies: 83
Views: 10,694
Posted By Ravalon
Techies like to debate things into the ground, regardless of how trivial they are. ;) You should hear some of the conversations I have with my coworkers. :lol:
Forum: C Feb 6th, 2007
Replies: 17
Views: 3,391
Posted By Ravalon
Yes and yes. :cheesy: There's another lesson there too, that even the most experienced of programmers can and will mess up the little things all too often. ;)
Forum: C Feb 5th, 2007
Replies: 33
Views: 9,979
Posted By Ravalon
Hi! :)

It looks like you declared p previously and didn't initialize it. You're probably getting the core dump from trying to dereference it. Change *p = strchr( line, '\n' ); to p = strchr( line,...
Forum: C Feb 5th, 2007
Replies: 17
Views: 3,391
Posted By Ravalon
Flushing should be conditional. If you know there are no more characters in the stream, don't flush it. :) You can be sure that there aren't any unwanted characters after a '\n' for stdin because of...
Forum: C++ Feb 4th, 2007
Replies: 6
Views: 1,986
Posted By Ravalon
Most C++ courses will only teach you a subset of the base language and not focus on graphics APIs that would complicate the lessons. That's a bit of a shame, but if you had to learn C++ and Win32 at...
Forum: C++ Feb 4th, 2007
Replies: 19
Views: 2,877
Posted By Ravalon
Your loop condition also does double duty as input. But you throw that value away and read the next one in the loop body.

while(infile >> ch) // Read one character
{
ch = infile.get(); //...
Forum: C++ Feb 4th, 2007
Replies: 4
Views: 1,181
Posted By Ravalon
Hi! :) We're all slowly getting better. Nothing is fast when it comes to learning how to code. :)

All of your variables are integers. Integers in C++ don't carry a precision, so input with...
Forum: C++ Feb 4th, 2007
Replies: 19
Views: 2,877
Posted By Ravalon
I don't think there's a way to use gets() safely. All of the damage is done behind the scenes where error checks won't help.

Nobody said to ignore it, just that there may be problems if you use it...
Showing results 1 to 40 of 209

 


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

©2003 - 2009 DaniWeb® LLC