Search Results

Showing results 1 to 40 of 119
Search took 0.02 seconds.
Search: Posts Made By: vmanes
Forum: C++ 30 Days Ago
Replies: 17
Solved: Void Functions
Views: 579
Posted By vmanes
You should check where the program crashes, and read the error message(s).

Check your arguments closely - what's being used here, and what is being used without having a value assigned?
...
Forum: C++ Oct 17th, 2009
Replies: 4
Views: 220
Posted By vmanes
I think a better approach would be just use getline to grab all of a line into a large string, then print out the first 22 characters that appear (or less if the line's not that long.)

You can...
Forum: C++ Oct 14th, 2009
Replies: 5
Views: 593
Posted By vmanes
What I believe the problem is asking you to do is set up the 2D array.

Read in the temperatures along the edges (is the temperature the same all along an edge or does it vary along the edge,...
Forum: C++ Oct 12th, 2009
Replies: 6
Views: 627
Posted By vmanes
I'll write that code for $25,000

How low can the bidding go?

Maybe this should move to Geeks' Lounge?
Forum: Geeks' Lounge Oct 10th, 2009
Replies: 2
Views: 340
Posted By vmanes
That email link is a third party service, it simply forwards email independent of a mail service. Hmm, might be handy.

To contact a DaniWeb member, click on their name in the upper left of the...
Forum: C++ Oct 10th, 2009
Replies: 5
Views: 366
Posted By vmanes
A little searching effort on your part will get results much faster than just shouting out questions to the world.

Try this (http://lmgtfy.com/?q=differences+are+between+c+%26+c%2B%2B)
Forum: C++ Oct 10th, 2009
Replies: 6
Views: 489
Posted By vmanes
Your smaller code compiled fine in VC++ 2008 Express, once I commented out the #include "stdafx.h".

Similarly, commenting out stdafx.h and a couple other minor changes to allow compiling as...
Forum: C++ Oct 10th, 2009
Replies: 1
Views: 148
Posted By vmanes
for the general search function, take the else return -1 out of the for loop. That return statement should only execute if you complete the for loop and don't find the search value.

int ary[]...
Forum: C++ Oct 9th, 2009
Replies: 5
Views: 187
Posted By vmanes
Well think of how you would do things if you had a red ball in your right hand, a green ball in your left. What steps would get the balls to be in the opposite hands? Keeping in mind, you can have...
Forum: C++ Oct 6th, 2009
Replies: 2
Views: 272
Posted By vmanes
Your second version is really not going to work - your swap portion only changes the assignment of the temporary pointers in the function, it does not change the ->next pointers in the actual nodes. ...
Forum: C++ Oct 3rd, 2009
Replies: 2
Views: 256
Posted By vmanes
for (i=1; i<=value; i++)
{
cout << "Enter some values: ";
while (cin >> value)
cin >> counter[i];

sum+= counter[i];
}

middle = sum / value;
Forum: Geeks' Lounge Oct 3rd, 2009
Replies: 162
Views: 10,152
Posted By vmanes
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is...
Forum: C++ Sep 20th, 2009
Replies: 3
Views: 249
Posted By vmanes
OK, you found the compile time error.

Now, there's still a potentially fatal logical error to be corrected.
Forum: C++ Sep 14th, 2009
Replies: 1
Views: 185
Posted By vmanes
look here (http://lmgtfy.com/?q=cause+effect+analysis)
Forum: C++ Sep 13th, 2009
Replies: 4
Views: 244
Posted By vmanes
when passing the row from a 2D array to a function that takes a 1D parameter, use only the row index in your argument.

foo( test[0] );

That essentially passes a pointer to where that row...
Forum: C++ Sep 7th, 2009
Replies: 4
Views: 226
Posted By vmanes
"Hello world", of course. It's the law!
Forum: Geeks' Lounge Sep 6th, 2009
Replies: 1
Views: 483
Posted By vmanes
It's so easy to just beat a program into submission - keep hitting the compile button and let the system find your mistakes, work at them one at a time. But machines have feelings, too...
Forum: C++ Sep 2nd, 2009
Replies: 23
Views: 1,004
Posted By vmanes
You're on the right track, but not really moving all the songs following the deleted item up. You only move the i+1 element to the i postion when the match was found. Everything past that will...
Forum: C++ Aug 29th, 2009
Replies: 9
Views: 450
Posted By vmanes
If the code above is in a loop, where you ask for a new word to seek, your problem is that the file is left pointing past its end.

Unless you do

dict.close( );
dict.clear( );

before you...
Forum: C++ Aug 24th, 2009
Replies: 12
Views: 747
Posted By vmanes
OK, how about this (http://www.softpedia.com/progDownload/Microsoft-Visual-C-Toolkit-Download-11595.html)?
Forum: C++ Aug 24th, 2009
Replies: 7
Views: 273
Posted By vmanes
Declaring the array as you're trying to do, you MUST declare the sizes of the row and column dimensions*.

To allow the user to enter the size at runtime, you'll have to use dynamically allocated...
Forum: Geeks' Lounge Aug 23rd, 2009
Replies: 5
Views: 683
Posted By vmanes
http://www.60secondbraingame.com/
Forum: Geeks' Lounge Aug 21st, 2009
Replies: 411
Views: 43,677
Posted By vmanes
Q: Why did the mermaid wear sea shells?

A: Because B shells were to small and D shells to big.

(Ok, this works better when spoken.)
Forum: C++ Aug 8th, 2009
Replies: 9
Views: 295
Posted By vmanes
(rand()%4)+1 can only give you values from 1 to 4, so you're going to have duplicates, possibly several of the same.

To get unique values, at each assignment you have to examine the previously...
Forum: Geeks' Lounge Jul 5th, 2009
Replies: 1,554
Views: 204,328
Posted By vmanes
Check back on that nine months later!
Forum: Geeks' Lounge Jul 2nd, 2009
Replies: 26
Views: 1,359
Posted By vmanes
Forum: Geeks' Lounge May 29th, 2009
Replies: 32
Views: 2,392
Posted By vmanes
I'm thinking Cleverbot ain't so clever. Liza was pretty good in her day.
Forum: C++ May 22nd, 2009
Replies: 12
Views: 1,020
Posted By vmanes
And for your future reference, when you have an if...else if block that is separating values into range groupings, you don't need to test both upper and lower bounds in the succeeding conditions.
...
Forum: C++ May 22nd, 2009
Replies: 12
Views: 1,020
Posted By vmanes
Instead of the big if...else if block, how about


for( int i = 0; i < 10; i++ )
{
index = arr[i] / 10;
str[index] += "*";
}
Forum: C++ May 20th, 2009
Replies: 6
Views: 338
Posted By vmanes
Imagine you have it all drawn out on paper - the locations of customers and the potential store sites. How would you solve it manually? Approach it from a strictly procedural method - don't assume...
Forum: C++ May 17th, 2009
Replies: 7
Views: 427
Posted By vmanes
It looks like you're close to having a working program.

Have you tried compiling? If so, you'd find that you have two errors. One is a missing #include and the other is a small typo. Find and...
Forum: C++ May 8th, 2009
Replies: 3
Views: 211
Posted By vmanes
Your first line creates an array of int pointers.

The p[i] line allocates memory to each of those pointers, in effect created an 2-dimensional array of ints. So, each p[i] is the name of a single...
Forum: C++ Apr 25th, 2009
Replies: 14
Solved: C++
Views: 902
Posted By vmanes
Well, some mod you are! Don't you see the sticky thread at the top about books? :icon_razz:

A good many of the first shown when you search Amazon look like good prospects, like #4 - C++ for...
Forum: C++ Apr 24th, 2009
Replies: 4
Views: 301
Posted By vmanes
We don't do homework for free.

We help you to fix and to understand the work you do.
Forum: C++ Apr 9th, 2009
Replies: 7
Views: 619
Posted By vmanes
When a cin >> is followed by getline( ), you will need to use the ignore( ) function in between. You normally don't need the ignore( ) between two input statements of the same type.
Forum: C++ Apr 8th, 2009
Replies: 7
Views: 496
Posted By vmanes
How about this in your row function?

while(e!=8)
{
Possible[f]=Possible[f+1];
f++;
}
What would cause that loop to ever end? And you have a similar problem in the column function.
...
Forum: C++ Apr 6th, 2009
Replies: 20
Solved: sorting
Views: 882
Posted By vmanes
Your second post looks like you're trying to do Bubble sort. You have the comparison and the exchange OK, it's the looping that's lacking.

Look in your textbook, or do a quick internet search and...
Forum: Geeks' Lounge Mar 19th, 2009
Replies: 80
Views: 8,397
Posted By vmanes
Tom retired in his early 50’s and started a second career. However, even though he loved his new job, he just couldn’t seem to get to work on time. Every day, he was 5, 10, 15 minutes late.

But he...
Forum: C++ Mar 15th, 2009
Replies: 4
Views: 257
Posted By vmanes
My crystal ball needs new batteries, so I really don't know what you're trying to do, or what your assignment is asking you to do.

Just looking at this bit of code, each of the three functions are...
Forum: C++ Mar 10th, 2009
Replies: 11
Views: 1,094
Posted By vmanes
foo2( ) will also give the size of the pointer, not the array.
Showing results 1 to 40 of 119

 


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

©2003 - 2009 DaniWeb® LLC