Posts
 
Reputation
Joined
Last Seen
Ranked #503
Strength to Increase Rep
+7
Strength to Decrease Rep
-1
92% Quality Score
Upvotes Received
52
Posts with Upvotes
49
Upvoting Members
42
Downvotes Received
4
Posts with Downvotes
4
Downvoting Members
4
6 Commented Posts
1 Endorsement
Ranked #858
Ranked #238
~257.71K People Reached
About Me

Typical software development nerd. Over-educated, perhaps. I'd rather be helping others with their programming difficulties than actually accomplishing anything of my own. Which is why I'm here. Your problems fascinate me, my own are boring. :)

Interests
Hiking, cycling, attending live music/theater productions, spending time with my son, staring at the…
PC Specs
Aging Shuttle form-factor box with Ubuntu installed, currently powered down. Two employer-provided laptops:…
Favorite Forums
Favorite Tags

364 Posted Topics

Member Avatar for marsh_mallows11

What is the question? And is this supposed to be C++ code, or Java? "P U Q" is normally called a "union", not a "sum". I'm not sure why you keep checking that elements of multiset are not zero in sum(), intersection() and difference(). Zero is a perfectly reasonable value, …

Member Avatar for Lesther_1
0
10K
Member Avatar for rigz

[CODE] bool keep_running = true; while (keep_running) { // do program stuff // prompt whether to keep running // handle response } return 0; [/CODE]

Member Avatar for Sunny_17
0
11K
Member Avatar for sandman64

What happens if you input -6? It looks to me as though your program will tell me it's odd. Try thinking through your problem out loud. If you can tell yourself logically how it should get to the answer, you should be able to program it correctly. For starters: "If …

Member Avatar for Swathi_4
0
222
Member Avatar for wannas

Can you clarify "get no result"? Were you able to build the executable? If so, did you get any error messages when you ran it? If it doesn't print anything to the console (assuming you're running it in a console window), did it occur to you that it might be …

Member Avatar for Mahesh_14
0
5K
Member Avatar for olelink

Not to pry into your personal business, but why would you want to do this, besides to spam somebody else's site? If you've been tasked with data entry to pre-populate a website, it would make more sense to enter the data into the back-end of the website, rather than through …

Member Avatar for nittu sarathe
-2
575
Member Avatar for chiste91

for ghosts, i'd start with the simplest thing first, and get that working. pseudocode: [CODE] next_ghost_pos = updateGhostPos(); while (next_ghost_pos == wall) { ghost_direction = rand() % 4; next_ghost_pos = updateGhostPos(); } ghost_pos = next_ghost_pos; [/CODE] This will have a ghost move in one direction until it hits a wall, …

Member Avatar for shafaqsajjad
0
11K
Member Avatar for shark101

Since you are new, suquan629, I'll offer a couple of pointers (no pun intended): 1. You don't need to memset the array to 0 since you've allocated it to be exactly as long as you need 2. Since this is a learning exercise, don't use strcpy(), instead use a loop …

Member Avatar for raptr_dflo
0
279
Member Avatar for Landoro

I'm not going to go into the code you "found" that does some of what you want. The purpose of the assignment is to write your own, starting with an understanding of what you are trying to accomplish (or what your friend is trying to accomplish, as the case may …

Member Avatar for raptr_dflo
0
282
Member Avatar for ConfusedLearner

Each variable has both an address and a value. After line 3 above executes, you have: * a (address = 0xFF2A, value = 32.5) * b (address = 0xFF2E [since each `float` takes 4 bytes], value = unknown [`*`]) after line 4 executes, you have: * a (address = 0xFF2A, …

Member Avatar for raptr_dflo
0
220
Member Avatar for niario

I'd like to start with your looping structure. At line 18 above, `if (baris == 1)`, since this is after the loop of baris over the range [0, bintang) is done, baris can only be 1 if bintang was also 1. And bintang == 1, looking at the outer loop, …

Member Avatar for raptr_dflo
0
472
Member Avatar for sandz24

> Base from what I read so far > 1. the image is divided into 8x8 sub-blocks > 2. then DCT is applied to each of the sub-blocks. I'm stuck here what happens next? What happens next is specific to the image-file-format. For instance, for lossy compression in the JPEG …

Member Avatar for raptr_dflo
0
931
Member Avatar for khalil2_88

I want somebody to do all my work for me too. But that's not how it works here on DaniWeb. Here, **you** write the code, and if there's something you don't understand, or if you're stuck on a particular point, you post the code you've written so far, along with …

Member Avatar for raptr_dflo
-1
193
Member Avatar for Z33shan

int num_rows = 10, num_cols = 2; int row, col; // allocate: a set of rows, then the set of columns for each row int **vals = new int * [num_rows]; for (row = 0; row < num_rows; row++) vals[row] = new int [num_cols]; // delete what you allocated, in …

Member Avatar for raptr_dflo
0
298
Member Avatar for jwill222
Member Avatar for HASHMI007

I suspect your error is a "Segmentation Fault", which typically results from trying to access an uninitialized (or already deallocated) pointer. With any luck your "some processor fault error" message actually includes a specific error code number, and maybe even the line of your program where the error occurred. That …

Member Avatar for raptr_dflo
0
142
Member Avatar for thinkerman

> // I have no idea what goes in the constructor Do you have some idea what the members of the class will be? So far, you haven't specified any. Also, your constructor and set() methods should not be private, otherwise there's no way for any code outside of the …

Member Avatar for raptr_dflo
0
105
Member Avatar for khuzdaar

You haven't failed. You just haven't gotten to the answer yet. I don't think the project is necessarily beyond what you've learned so far. If you have categories, then each category contains an array of words. If the number of words is **up to** 7, then each category must also …

Member Avatar for khuzdaar
0
324
Member Avatar for Nathaniel10

Hi Nathaniel, excellent work over all. (Sorry to be jumping in here, but that's how it works some times!) Line 75 in your Delete() method is almost certainly not what you meant (though it looke like line 77 is good). What does it mean if Previous_ptr is NULL, and what …

Member Avatar for Nathaniel10
0
299
Member Avatar for mehdimughal

Please write complete words. Your txting shorthand makes my brain hurt. The first thing I see is within your `main()` in main.cpp, you're recursively calling `main()`. Don't ever do that; a number of compilers won't even compile it. `main()` is the entry point from the operating system into your program. …

Member Avatar for mehdimughal
0
409
Member Avatar for Ahmed2

When you copy the elements of list1 into list2, you're copying the pointers to the FileInfo objects, so that `list1[i]` and `list2[i]` both point to the same allocated FileInfo instance. Either create a copy-constructor FileInfo(const FileInfo &other): a(other.a), b(other.b), ... {} or make your lists of `<FileInfo>` instead of `<FileInfo …

Member Avatar for mike_2000_17
0
232
Member Avatar for Eagles36

In test2, where it fails to find the value of 40 in the node after 30, print out what it **did** find (or "no next node" if is_item() fails). Same for other tests. A useful debug method might be `printEntireList()`, which can avoid using the other methods (so as not …

Member Avatar for uzairrahim
-1
2K
Member Avatar for aquaben

Ignoring the fact that you define, but don't call, `enter_password()` and `enter_name()` functions ... at line 25, you get some input and assign it to variable `pwrd`, but at line 26, you're trying to check the value of variable `input` which you haven't assigned at all. And the way you …

Member Avatar for TrustyTony
0
150
Member Avatar for arlir

At line 232 above, you're always reading into the 1000th position of the array, which doesn't even exist (valid indices are from 0 to 999). I think you meant `&customer[track]`. Then at line 255, you're trashing your value of track by assigning to it the value of getche(). Use a …

Member Avatar for raptr_dflo
0
85
Member Avatar for ngurjar

Looks like you might need to write your own, if you need full RTF support. See [wikipedia](http://en.wikipedia.org/wiki/Rich_Text_Format), especially the "Implementations" section for an idea of where to look for help.

Member Avatar for raptr_dflo
0
73
Member Avatar for jnewman3

In at least two places, your for() loop looks like this: for(int location = 0; location > tableSize; location++){ I think you mean `location < tableSize;`.

Member Avatar for raptr_dflo
0
345
Member Avatar for dkXIII

Instead of `if (inputFile)`, try `if (inputFile.is_open())`. And when posting your code, please select all of it and click the **Code** button at the top of the editor, or just hit the tab-key to do the same thing. Then all of your code will get line-numbered and formatted together, instead …

Member Avatar for Tommeh
0
271
Member Avatar for Sabrachick

Let's start simple. Do you understand Part 1 of the assignment? Can you code that much up and see if it will compile? Then can you use create an instance of the class, use the setters to populate the instance, and the getters to verify the values? Third, add a …

Member Avatar for raptr_dflo
0
189
Member Avatar for pendo826

This should get you started: template<class Datatype> class DListNode { public: //********Member Variables******** Datatype m_data; DListNode<Datatype>* m_prev; DListNode<Datatype>* m_next; //*********Methods******** ... };

Member Avatar for raptr_dflo
0
145
Member Avatar for Karlwakim

Usefulness, like beauty, is in the eye of the beholder. The most useful program you can write, to practice the basics, is one that would be useful to **you**. Write your own address-book / contact-list program, that lets you store and find the info you want **your** way. Own a …

Member Avatar for raptr_dflo
0
179
Member Avatar for nekoleon64

I'm not entirely sure, but if you're working in Visual Studio, it gets very fussy about the definition of main(). I'd recommend creating a new project of the desired type ("Console Application" is probably best), and then including "Planet.h" and any other additional includes at the top, and pasting the …

Member Avatar for StuXYZ
0
2K
Member Avatar for garu525

Looks like you're off to a good start. I believe operator==() is generally expected to return type bool, rather than int, so you could just do: return this->from == other.from && this->to == other.to && this->weight == other.weight; But I think it'll work as-is.

Member Avatar for mrnutty
0
282
Member Avatar for BryantFury

Instead of having your `order` class look a lot like an individual `product` (but with different names for the members), have it encapsulate the array of desired `product` instances selected by the user. Using the same idea, you could wrap your `arrayp` from main() in a `catalog` class that encapsulates …

Member Avatar for BryantFury
0
585
Member Avatar for naresh4230

This is almost certainly a visual indication that the checkbox (or radio-button) now has keyboard focus (meaning that the space-bar will toggle the state of the checkbox, or select an unselected radio button -- hitting the tab key to move the focus among widgets should confirm this). If you don't …

Member Avatar for raptr_dflo
0
189
Member Avatar for Sonia kh

At line 102, you're resetting y1 in terms of j, regardless of the value of i. You can simplify a great deal of your code by changing where you update values, and noticing something about how the squares alternate: for (i=1; i<=8; i++) { // adjust y2 to match y1 …

Member Avatar for raptr_dflo
0
472
Member Avatar for inspire_all

The same thing happens on the stack with recursion as with any other function call. In this case, when you first call `node * root = t.create()`, a frame is added to the stack with space for the returned `node*` and the address of the following instruction to return to, …

Member Avatar for raptr_dflo
0
125
Member Avatar for Nawaf15

Funny, to me, it looks like very clearly written instruction in how to use the *markdown* language for minimal in-line formatting. Or, for the more GUI oriented, you could just select all your code lines using the mouse, and click the **Code** button along the top of the editor, it …

Member Avatar for raptr_dflo
0
122
Member Avatar for cryonize

Your sorting code in main() looks close, but as doomilator suggests, move it into the Sort() routine. Then initialize j = i->NEXT and loop while j != NULL (otherwise you're needlessly comparing i to itself the first time, and never checking the last element in the list). Also, your comparison …

Member Avatar for raptr_dflo
0
964
Member Avatar for stupendousomega

Please use the **Code** button above the editor to maintain formatting of and line-number your code. The error is a missing `*` before `Health` in the first line of `class Player`. That said, why do you want the inefficiency of all those pointers to integers for your class members? Just …

Member Avatar for raptr_dflo
0
163
Member Avatar for help wanted

For case 'e', how are you adding the new info into your list? For case 'l', how do you plan to iterate over your list and display each contact? And obviously case 'f' needs work. Since I don't know specifically where you're stuck, I suspect the problem is that you're …

Member Avatar for raptr_dflo
0
253
Member Avatar for stereomatching

I've been working extensively with Python and Qt via the PyQt bindings from Riverfront. First of all, an "object" doesn't throw an exception, code associated **with** the object does. So what you may want to encapsulate in a try/catch block is any method call on the textEdit. The constructor almost …

Member Avatar for raptr_dflo
0
202
Member Avatar for Slavrix

You need to determine whether the 1D version of the matrix is in row- or column- major order. Also, whether the matrices are designed to be applied in prefix or postfix order. These are more or less the same question. I prefer to think of matrices as I learned them …

Member Avatar for raptr_dflo
0
996
Member Avatar for compsci91

Sounds like a take-home quiz. Good luck with that. Google is an amazing search tool.

Member Avatar for raptr_dflo
0
90
Member Avatar for Sloppos21

A great place to start is the "Read Me: Read This Before Posting A Question" item at the top of the forum listing. Since we're not mind-readers, and can't see your screen from this far away, we don't know what you've attempted, nor what specific failures resulted. Can you prompt …

Member Avatar for Sloppos21
0
200
Member Avatar for compsci91

The code isn't even correct as written, but what the line in question says is: * take the argument `ss`, which is a const-reference to the passed object (meaning we're promising not to change the original object, even though we're looking at it) * use the `&` operator to create …

Member Avatar for raptr_dflo
0
140
Member Avatar for BryantFury

I'm not positive, but it sounds like you're unclear on classes, and "object-oriented-ness" in general. For a case as simple as yours, an Object can be thought of simply as an abstraction of a real world object. Specifically a "product". Objects contain their attributes ("members") and most basic actions ("methods"). …

Member Avatar for BryantFury
0
119
Member Avatar for pjh-10

Since it's been a day or so, I'll jump in! The "x-1" you've seen is part of the process of shuffling an array, which isn't part of this assignment. The reason it exists, if you look back to your earlier code sample which shuffled the song list, is because by …

Member Avatar for pjh-10
0
443
Member Avatar for funkey100

As far as storing values in a file (or in a database on a server), it's a good idea to use an encryption scheme to store something like a password. You can't make the file otherwise readable to your program, but unreadable to everyone else. And if you could, you …

Member Avatar for histrungalot
0
369
Member Avatar for PoolShark1

I don't see where you implement the methods sepcified in Resistor.h. Instead, you've implemented two standalone functions, and then provided prototypes for them in ResistorMain.cpp. Meanwhile, you have code that tries to create a new resistor object by passing what appears to be a nominal-resistance, a percentage tolerance, a name …

Member Avatar for PoolShark1
0
201
Member Avatar for shadyreal

[QUOTE]error C3867: 'cc_real::Form1::WaitForMessage': function call missing argument list; use '&cc_real::Form1::WaitForMessage' to create a pointer to member[/QUOTE] So did you try what it says? At line 232 above, replace [CODE] SdbCreateThread(WaitForMessage, 0); [/CODE] with [CODE] SdbCreateThread(&WaitForMessage, 0); [/CODE] As far as I'm aware, each is equivalently "a pointer to the function", …

Member Avatar for raptr_dflo
0
368
Member Avatar for Chuckleluck

That number of collision-tests shouldn't be bad. Most of "efficiency" involves a priori knowledge of what's going on. For example, if the ground stays flat and your players start above the ground, and are supposed to stay there, then you can use a simpler collision: just make sure each player.y …

Member Avatar for raptr_dflo
0
303

The End.