Search Results

Showing results 1 to 40 of 973
Search took 0.05 seconds.
Search: Posts Made By: Alex Edwards
Forum: C++ May 8th, 2009
Replies: 6
Views: 370
Posted By Alex Edwards
Yeah, after realizing how tired I was I also realized that I never answered the original question.

the getline function is accepting characters for your string but it doesn't seem like you're...
Forum: C++ May 8th, 2009
Replies: 6
Views: 370
Posted By Alex Edwards
This may help--


#include <iostream>
#include <string>
#include <cstdlib>
#include <sstream>

using namespace std;
Forum: C++ May 8th, 2009
Replies: 1
Views: 532
Posted By Alex Edwards
Have you done any research on Search Engines and how they are structured?

Do you understand the benefits of using a HashTable for this assignment?

I guess a good start would be to create a...
Forum: C++ Apr 29th, 2009
Replies: 3
Views: 577
Posted By Alex Edwards
I think it would be more useful if one could pass the string into a method and have it return the number of question-marks found (as an unsigned int, or in extraordinary cases an unsigned long int).
Forum: Java Apr 29th, 2009
Replies: 10
Views: 756
Posted By Alex Edwards
If you post your files, people will be more willing to help because it gives them time to look at your logic and help you understand which steps to take to complete your project.
Forum: Java Apr 11th, 2009
Replies: 11
Views: 700
Posted By Alex Edwards
Since any Java-API based class is valid for the assignment....

I suggest inserting the values into a B-Tree (Binary Tree) then printing the objects in the tree via In-order traversal.


import...
Forum: Java Apr 11th, 2009
Replies: 11
Views: 700
Posted By Alex Edwards
More details are needed.

For example, what type of goal are you trying to achieve? Finding a low-running time way of printing your array or just getting the job done?


The Iterative/Recursive...
Forum: C++ Nov 29th, 2008
Replies: 6
Views: 398
Posted By Alex Edwards
1) That's me intermingling Java and C++. There's nothing more to say there.

2) Nothing I disagree with, but I tried making a simpler example for the OP to follow.
Forum: C++ Nov 29th, 2008
Replies: 6
Views: 398
Posted By Alex Edwards
You'd be surprised how much programming and math are related! =)

In fact, before I wanted to program I pursued a math major with more of a background in creative writing. I don't know how but I...
Forum: C++ Nov 28th, 2008
Replies: 6
Views: 398
Posted By Alex Edwards
Hmm, parameters are typically a part of a method's call argument(s). I'm assuming the assignment requires you to create a method that has a reference parameter and returns the result through the...
Forum: C++ Nov 28th, 2008
Replies: 8
Views: 744
Posted By Alex Edwards
void TestVector(Vector<double> v)
{
}

int main()
{
Vector<double> pd(5.6,3.4,2.4);

// use the cast operator works if copy ctor is not defined
Vector<float> pf = pd;
Forum: C++ Nov 27th, 2008
Replies: 9
Views: 548
Posted By Alex Edwards
By no means am I attempting to discredit any Instructor. The assignment is familiar to me - very similar to what I had to do in a C++ class.

-Alex
Forum: C++ Nov 27th, 2008
Replies: 9
Views: 548
Posted By Alex Edwards
Is your Instructor's name Ron, by chance?

-Alex
Forum: C++ Nov 27th, 2008
Replies: 6
Views: 2,641
Posted By Alex Edwards
Subtraction is technically the same as adding a negative, so there was no need to add a subtraction operator to the doOperation method. Conversions from subtraction to adding a negative are most...
Forum: C++ Nov 26th, 2008
Replies: 9
Views: 2,371
Posted By Alex Edwards
You know, I've been wondering about this for awhile now myself.

Honestly you can probably get away with making some kind of regex or key to "compress" files with given values.

For example lets...
Forum: C++ Nov 25th, 2008
Replies: 5
Views: 692
Posted By Alex Edwards
1) My Answer: Composition ( I believe you meant to say Composition ? ) is a form of delegation in which instances of a class use, but may not have the same interface of a target object.

The major...
Forum: C++ Nov 22nd, 2008
Replies: 3
Solved: Parsing error
Views: 429
Posted By Alex Edwards
There is hope!

Use fmod to resolve the modulus between two doubles



#include <iostream>

using std::cin;
using std::cout;
Forum: Java Nov 22nd, 2008
Replies: 7
Views: 862
Posted By Alex Edwards
Unfortunately, the implementation of ArrayList<T> looks [something] like this--


//... necessary imports

public class ArrayList<T> extends List<T> implements Collection<T>, Serializable{

...
Forum: C++ Nov 22nd, 2008
Replies: 5
Views: 1,079
Posted By Alex Edwards
Hmm, try changing char to unsigned (if it exists @_@ )

-Alex

Edit: I am really tired #_#

I didn't realize I made the array back-asswards XD

XP
Forum: C++ Nov 22nd, 2008
Replies: 5
Views: 1,079
Posted By Alex Edwards
You can use the bool array as a "bit-position" array for the representation of a char.



#include <iostream>

using std::cout;
using std::cin;
using std::endl;
Forum: Java Nov 22nd, 2008
Replies: 7
Views: 862
Posted By Alex Edwards
You'll probably have to reposition your read-stream cursor after each object read, otherwise you won't retrieve the right byte value from the file to match the data type(s) for the Object you are...
Forum: Java Nov 22nd, 2008
Replies: 7
Views: 638
Posted By Alex Edwards
I'm not sure how you plan to pause a method from executing instructions within it without somehow pausing (or 'blocking') at a particular line in the method.

If you don't want to use a while loop,...
Forum: C++ Nov 22nd, 2008
Replies: 4
Views: 469
Posted By Alex Edwards
From what I understand, as long as a file has C++ syntax in it, it can be used as part of a C++ project ( if its a resource file its a different story I suppose, since I haven't really messed around...
Forum: C++ Nov 21st, 2008
Replies: 9
Views: 511
Posted By Alex Edwards
Ah... I think I'm understanding...

So basically, for an octet byte (8 bits) the table would look something like this...


constant integral types:

(using this list as an example)

-char ...
Forum: C++ Nov 21st, 2008
Replies: 9
Views: 511
Posted By Alex Edwards
I'd like to know how the types are defined based on the platform.

I have heard that in C++ a char is always 1 byte and an integer is always 4 bytes on any machine, despite how many bits are...
Forum: C++ Nov 21st, 2008
Replies: 9
Views: 511
Posted By Alex Edwards
In C++, where are the header files that define the standard primitives and bitfields?

I would like to confirm something, if it is possible.

-Alex
Forum: Geeks' Lounge Nov 21st, 2008
Replies: 40
Views: 4,380
Posted By Alex Edwards
Oddly enough, your avatar scares me... @_@
Forum: Geeks' Lounge Nov 20th, 2008
Replies: 28
Views: 1,987
Posted By Alex Edwards
I have said this before, but...

From the gas station... White chocolate, cheesecake, rootbeer, 1/2 shot Latte O_O

From Starbucks, typically a White-chocolate mocha along with a butter-horn.
...
Forum: C++ Nov 20th, 2008
Replies: 2
Views: 298
Posted By Alex Edwards
That means you are literally treating something that isn't an lValue as an lValue.

For example if a method doesn't return a reference to something, its possible that attempting to treat the method...
Forum: C++ Nov 20th, 2008
Replies: 14
Solved: Crash Windows
Views: 1,113
Posted By Alex Edwards
Rep-worthy! XD

It's too bad I can't give you any more rep today @_@

-Alex
Forum: Java Nov 20th, 2008
Replies: 11
Views: 1,196
Posted By Alex Edwards
If there is already a class available that can search through all of the files on your System, why not make a Decorator class or a class that Maps files (or file names) to a number, and if the file...
Forum: C++ Nov 20th, 2008
Replies: 14
Solved: Crash Windows
Views: 1,113
Posted By Alex Edwards
I don't know why... but I found the first post amusing XD

But I'm laughing with you Beast! I promise! O_O

-Alex
Forum: C++ Nov 20th, 2008
Replies: 3
Views: 304
Posted By Alex Edwards
If you have a finite number of values and they aren't going to change, you can get away with using a standard array instead of a vector.

This is only if you have a static amount of values and...
Forum: C++ Nov 20th, 2008
Replies: 3
Views: 291
Posted By Alex Edwards
The error codes are usually self explanatory, though with Dev-Cpp that can be a different story since the IDE is currently 'dead' (it works, but it is old and I believe it only deals with gcc and old...
Forum: C++ Nov 20th, 2008
Replies: 3
Views: 440
Posted By Alex Edwards
void delNeg(node * L)
{
node *cur = L; // cur points to accepted pointer
node *prev = NULL; // prev points to NULL

while(cur != NULL) // while cur doesn't point to NULL
{...
Forum: Java Nov 18th, 2008
Replies: 10
Code Snippet: Simple Equation Solver
Views: 5,109
Posted By Alex Edwards
Implemented Right-to-left evaluations for powers. Negatives were improved (slightly) by making negatives parse as multiplying -1 by the value.


import java.util.*;
import java.io.*;
import...
Forum: C++ Nov 18th, 2008
Replies: 6
Solved: Strings in C++
Views: 546
Posted By Alex Edwards
Use stringstream if you want to append values to a string buffer on one line then extract the string later.




#include <iostream>
#include <sstream>
#include <string>

using...
Forum: C++ Nov 18th, 2008
Replies: 4
Views: 367
Posted By Alex Edwards
I tried this (using MS Visual C++ 2005/2008) and it managed to work--


#include <iostream>

using std::cout;
using std::cin;
using std::endl;
using std::flush;
Forum: C++ Nov 17th, 2008
Replies: 3
Views: 373
Posted By Alex Edwards
If possible, please post the solution.
Forum: C++ Nov 17th, 2008
Replies: 4
Views: 898
Posted By Alex Edwards
Showing results 1 to 40 of 973

 


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

©2003 - 2009 DaniWeb® LLC