Showing results 1 to 40 of 500
Search took 0.05 seconds.
Posts Made By: vmanes
Forum: C++ 3 Hours Ago
Replies: 3
Views: 110
Posted By vmanes
Re: Need experienced debugger will pay.

More goats does not get more correct code -- just a bigger mess to clean up.

Easier to clean up the code, bit by bit, as Salem said.

(but you do get credit for sense of humor ;) )
Forum: C++ 3 Hours Ago
Replies: 1
Views: 43
Posted By vmanes
Re: solving a quadratic equation

This is programming, not algebra. You must show the multiplication operator, where you can omit it in mathematical expression.
SubfunctionResult = ((b*b)-4(a)(c)); must be

SubfunctionResult = ( b*b...
Forum: C++ 10 Hours Ago
Replies: 3
Views: 60
Posted By vmanes
Re: Char array and Getline question - really basic

It kind of depends on how the assignment defines "words". If you mean any sequence of displayable characters, bounded by whitespace (thus, a punctuation would be included with the word it precedes...
Forum: Geeks' Lounge 1 Day Ago
Replies: 52
Views: 3,234
Posted By vmanes
Re: Panopticon (who is watching you now?)

There's nothing scary at all about InfraGard (http://www.infragard.net/). It's about education and information sharing. The members and member organizations have no police powers, can't do anything...
Forum: Geeks' Lounge 3 Days Ago
Replies: 5
Views: 130
Posted By vmanes
Re: Baby Powder + Hair Dryer =

Be even better to see the payback.
Forum: C++ 3 Days Ago
Replies: 3
Views: 109
Posted By vmanes
Re: Sizeof operator help

0 (zero) has to come out the pot somewhere, and the way signed ints work, it comes out of the positive half.
Forum: C++ 4 Days Ago
Replies: 3
Views: 75
Posted By vmanes
Re: help my out put isnt working

And, if I may make a couple comments on style.

You have main's variables in global space (lines 8-15). This is generally frowned upon - variables that are global can be modified by all functions,...
Forum: C++ 4 Days Ago
Replies: 3
Views: 75
Posted By vmanes
Re: help my out put isnt working

What mrboolf said is correct, you're displaying the address of the costs array.

Also, put line 91 before the output in line 89 - you are not storing the computed cost to the cost array till after...
Forum: Geeks' Lounge 4 Days Ago
Replies: 140
Views: 8,150
Posted By vmanes
Re: What bumper sticker would your COMPUTER wear?

That's one awfully slow, awfully old computer! The IBM PC of 1981 was 10 times faster than that.
Forum: Geeks' Lounge 4 Days Ago
Replies: 6
Views: 122
Posted By vmanes
Re: Beer with Benefits

Mmmmmmm, beer!

Here's some quotations (http://thinkexist.com/quotations/beer/)about the wonderful brew.
Forum: Networking Hardware Configuration 4 Days Ago
Replies: 1
Views: 96
Posted By vmanes
Re: Linksys wireless router problems

Better place to ask is in the networking forum (http://www.daniweb.com/forums/forum23.html). Here we just mostly shoot the breeze.

You should state what model router it is. Did you try connecting...
Forum: C++ 5 Days Ago
Replies: 3
Views: 69
Posted By vmanes
Re: unable to use destructor

In VC++ 2008, that did not fix the problem. See my previous comments.

When the assignment to c has completed, it's members are pointing to the same memory that a allocated. When c's destruction...
Forum: C++ 5 Days Ago
Replies: 3
Views: 69
Posted By vmanes
Re: unable to use destructor

I think the problem here is you need to also define copy constructor and operator= methods. Since you are allocating pointers in the constructor, the system provide shallow copy is not sufficient. ...
Forum: C++ 6 Days Ago
Replies: 2
Views: 80
Posted By vmanes
Re: Call by Reference using Classes

In the malfunctioning sample, you have parameter names for the get function the same as the class's members. In the function, the parameters are in local scope, so the x=x+2; is only referencing the...
Forum: IT Professionals' Lounge 6 Days Ago
Replies: 8
Views: 208
Posted By vmanes
Re: associates degree versus master's degree

The average starting salary for recent undergrad CS majors (http://sdmines.sdsmt.edu/cgi-bin/global/a_bus_card.cgi?SiteID=228101) from my university is $56K.
Forum: C++ 6 Days Ago
Replies: 19
Views: 359
Posted By vmanes
Re: Loop/Function errors

Your while loop says "Stay here until the user enters a zero for both x and y. Even if I enter two zeroes, I still have to enter an operation option?

You really shouldn't have input values and stop...
Forum: C++ 6 Days Ago
Replies: 15
Views: 232
Posted By vmanes
Re: readfile help

And you're mixing up your p's and t's again!

while(file >> name[t] >>distance[t] >>height[t])
{
pObject[p].setName(name[p]); // use name[t]
pObject[p].setDistance(distance[p]); // use...
Forum: Geeks' Lounge 6 Days Ago
Replies: 3
Views: 102
Posted By vmanes
Be careful what you ask for

Funny movie (http://www.youtube.com/watch?v=P5_Msrdg3Hk). There's a moral to the story.
Forum: C++ 6 Days Ago
Replies: 15
Views: 232
Posted By vmanes
Re: readfile help

what are you trying to do with this:

cout <<fill(pObject[q].getName(),7) << //continues ok
Forum: C++ 6 Days Ago
Replies: 15
Views: 232
Posted By vmanes
Re: readfile help

in the loop - read data into single string, distance, height variables.

If you need to validate them, do so.

Then assign them to the data members of pObject[p], within the loop.

What you've just...
Forum: Geeks' Lounge 6 Days Ago
Replies: 9
Views: 188
Posted By vmanes
Forum: C++ 6 Days Ago
Replies: 9
Views: 183
Posted By vmanes
Forum: Geeks' Lounge 7 Days Ago
Replies: 18
Views: 373
Posted By vmanes
Re: Price of gasoline (petrol to some) - update

To get back on topic, US gas price is now at about the level it was in early 2004. In the last six months prices of many goods rose along with gas, due to production and transportation increases. ...
Forum: Geeks' Lounge 7 Days Ago
Replies: 18
Views: 373
Posted By vmanes
Re: Price of gasoline (petrol to some) - update

As long as you're with him shooting at lawyers, it's OK. You don't need to use the expensive ammo on them.
Forum: Geeks' Lounge 7 Days Ago
Replies: 0
PMP
Views: 84
Posted By vmanes
PMP

When I first saw a book on the shelf, in the computer section of the bookstore ,with this title, I was confused. Really, why would they have picked that TLA for Project Management Professionals? ...
Forum: Geeks' Lounge 7 Days Ago
Replies: 5
Views: 127
Posted By vmanes
Re: This is awesome!!

I had an inkling at first, from the rhythm. But wasn't sure till later on.
Forum: C++ 7 Days Ago
Replies: 9
Views: 183
Posted By vmanes
Re: Cin won't pause even though I've flushed the input stream (I think)

I agree with WaltP - the for( ; ; ) is really less clear your intent than while(true) - if you think that's too long, then while( 1 ).

Really, how often do you really mean to have a loop be...
Forum: C++ 7 Days Ago
Replies: 15
Views: 232
Posted By vmanes
Re: readfile help

If you were in fact storing to the database ( pObject array) then index p would work. In the code you provided, you are storing to a small local array allocated in the function, so your bounds on...
Forum: C++ 7 Days Ago
Replies: 15
Views: 232
Posted By vmanes
Re: readfile help

The problem is paramter "p" to the function. Since it's passed by reference, and if you don't reset it (as I assume you don't want to), it comes back into the function at a value greater than 0. ...
Forum: C++ 7 Days Ago
Replies: 13
Views: 186
Posted By vmanes
Re: fstream problem.

every text should cover this

fin.open ( "somefile.txt" );
if( !fin ) // or if( fin.fail( ) )
{
//error handler goes here
}
else
{
//file opened successfully, start reading
Forum: Geeks' Lounge 8 Days Ago
Replies: 6
Views: 168
Posted By vmanes
Re: Man Gets Pissed At Keyboard

Keyboard vid - been there ,done that. Got the key imprints in fist to prove it ;)

Treadmill - wonder if there's someone with a remote control hooked up to it? That would be a wicked prank.
Forum: C++ 8 Days Ago
Replies: 13
Views: 186
Posted By vmanes
Re: fstream problem.

You're asking a question that's not exactly what I think you mean.

if ( (! ifile.size( ) ) == 0 ) means, logically negate the value the size function returns, giving you a boolean true or false...
Forum: C++ 8 Days Ago
Replies: 13
Views: 186
Posted By vmanes
Re: fstream problem.

And, the test you're doing is only testing the filename the user entered, it does not test if there's actually a file or if it has any content.

(this should have come after my next reply - they got...
Forum: C++ 8 Days Ago
Replies: 13
Views: 186
Posted By vmanes
Re: fstream problem.

That should work. Please post the exact data file contents you're trying to read.
Forum: C++ 8 Days Ago
Replies: 19
Views: 359
Posted By vmanes
Re: Loop/Function errors

while (x || y != 00) ;
You cannot compare in that fashion and get the result you want. What your statement says is while ( x OR y ) not equal to 0 which compares the boolean result of ORing x and...
Forum: C++ 8 Days Ago
Replies: 13
Views: 186
Posted By vmanes
Re: fstream problem.

What are the data types of the variables?

With the mdy variables as ints and the c as a char, it seems to work for me - I get the negative values.

A full code sample illustrating your problem will...
Forum: C++ 8 Days Ago
Replies: 11
Views: 177
Posted By vmanes
Re: Strange errors in program

Well, you're in the C++ forum, thought you'd be using C++.

In C, I suppose you can still use the getchar(), but you need to check that it's not the newline that's just been read.
Forum: C++ 8 Days Ago
Replies: 11
Views: 177
Posted By vmanes
Re: Strange errors in program

No, it has to do with how you're getting the input. getchar() grabs every char entered, including the newline. You end with extraneous data in your array.

If you enter the 16 characters in one...
Forum: C++ 8 Days Ago
Replies: 11
Views: 177
Posted By vmanes
Re: Strange errors in program

I was able to enter four rows of four characters. At least, I believe that's what it did, not seeing any display.
Forum: C++ 8 Days Ago
Replies: 11
Views: 177
Posted By vmanes
Re: Strange errors in program

It runs 4 times for me. The prompt to enter another row is in a bad place, it comes up one more time after the last row has been entered.

Perhaps

// printf("Enter the first row: "); //delete...
Showing results 1 to 40 of 500

 
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 5:01 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC