Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
100% Quality Score
Upvotes Received
4
Posts with Upvotes
4
Upvoting Members
3
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
4 Commented Posts
0 Endorsements
Ranked #718
~13.0K People Reached
Favorite Tags

64 Posted Topics

Member Avatar for PhiberOptik

I usually use Eclipse, but switch over to Netbeans when I do any sort of GUI.

Member Avatar for mjason
0
214
Member Avatar for rahini

What protocol do you want to simulate? At what layer? You should be able to code a simulation up depending on which protocol you want to simulate. You might also want to do a search into network simulation tools. I haven't used any, but I've heard of omnet and ns-2 …

Member Avatar for mni
0
156
Member Avatar for daviddoria
Member Avatar for Freaky_Chris
0
779
Member Avatar for manzoor

Here are another 2 options: 1) Make a copy of the array, and do only a partial selection sort. Use the variation of selection sort that puts the largest element at the end. Since you only want the top n elements, only run the outer loop of selection sort n …

Member Avatar for Salem
0
202
Member Avatar for andrepezzo

If your SoapPair class has any member variables, all of them have to be of a type that is serializable.

Member Avatar for ~s.o.s~
0
167
Member Avatar for clb8372

Your instructor's feedback is extremely straight forward... Also he did miss some things: - The US dollar to English pound conversion in your code is incorrect, take a closer look at the conversion list to see why.. - Your output module only outputs the currency type... are you sure that's …

Member Avatar for VernonDozier
0
287
Member Avatar for q8y_4u

Not sure where to start on this one... You haven't really followed the instructions. The instructions state that EACH student data record should be dynamically allocated. Instead your student list creates a static sized array of 100 records. What you need to do is make a StudentRecord class which stores …

Member Avatar for AHUazhu
0
205
Member Avatar for vicky_dev

1. recv() will NOT necessarily receive all the bytes sent in one call. You will have to loop it. Since recv() returns the number of bytes received, what you can do is have the sender always put an integer at the start of each message specifying the length of the …

Member Avatar for vicky_dev
0
247
Member Avatar for PhiberOptik

The panel class needs a reference to your frame class. Assuming your frame class creates the panels, the frame should send a reference to itself ([I]this[/I]) as an argument to the panel constructor. You will need to change the panel constructor to accept this argument and store it. Now when …

Member Avatar for BestJewSinceJC
0
218
Member Avatar for eng.M4AH

I would argue that the majority of code people write is iterative rather than recursive. Because recursion has more overhead in terms of memory and speed, iterative approaches are generally preferred unless the recursive version is much simpler to understand and implement. I'd say the biggest downside to recursion is …

Member Avatar for mahlerfive
0
134
Member Avatar for chasee

Instead of: int board[4][4]; Replace with: int** board; Now we can dynamically allocate space for the 2D board array. In set_board(), we need to do the dynamic allocation like so: [code] // First allocate for the first dimension board = new int*[height]; // Now allocate for the second dimension for( …

Member Avatar for mahlerfive
0
131
Member Avatar for clueless101

The lowercase part you have actually won't work for all cases... What I would do is just have a boolean variable for each condition, and each check will set the appropriate variable to true or false. Then at the end just 'and' them all together to get whether it is …

Member Avatar for clueless101
0
129
Member Avatar for star100
Member Avatar for youngman_kurd

Not really sure what you are asking... but if you're asking what sum = sum + 5; does, then the answer is that it increases the value stored in sum by 5.

Member Avatar for Salem
0
102
Member Avatar for Holy Roller

Also try to keep your indentation a standard width - usually 3 or 4 spaces is good. As for the non-standard includes as mentioned above, I'm guessing you are using something old like borland or turbo C... I would recommend you start using either VC++ or Code::Blocks.

Member Avatar for VernonDozier
0
118
Member Avatar for soniagupta98

The other option is to just sort both arrays which will make traversing the arrays and finding non-duplicates much easier.

Member Avatar for mahlerfive
0
397
Member Avatar for Awebb999

Well if the output is always zero, then either 5/9 is 0 or F-32 is 0. Try and write a small program that just prints the result of 5/9 and one that prints the results of F-32 after the user enters F. That might help you narrow down the problem.

Member Avatar for mahlerfive
0
282
Member Avatar for mrnutty

Have you learned about classes in your course yet? If so then you should be using them. If not, you should at least break your functions up into smaller, more manageable functions. Also you should learn how and when to use header files and multiple cpp files rather than having …

Member Avatar for mrnutty
0
485
Member Avatar for gamer12223

You are getting mixed up about what should be in your main() and what should be in your class methods. As the problem specifies, input for a TMoney should be done in the inputdata() method, and output should be done in the outputdata() method. The main should only declare an …

Member Avatar for gamer12223
0
137
Member Avatar for Foe89

Hmm not exactly sure what that would be happening, but there are still a couple things you need to change. At the top you should declare gRow and gCol as const int - I'm not sure how this even compiles with no type given. Also you should make a loop …

Member Avatar for StuXYZ
0
167
Member Avatar for JLopeman

Since you are adding nodes to the head (start) of the list, the last node you add will be in position 0. The output is correct for the example you gave. I'm assuming the list isn't supposed to be sorted - if so then you need to change your add …

Member Avatar for JLopeman
0
169
Member Avatar for jbennet

The Java API is your friend: [url]http://java.sun.com/javase/6/docs/api/[/url] Look up FileWriter, look at the constructor and the write methods.

Member Avatar for ~s.o.s~
0
109
Member Avatar for krhillery

You will need nested loops. The inner loop will print one line of numbers, while the outer loop controls how the pattern changes for the inner loop. If you're still stuck, try solving the problem in steps. First create a loop that will print just one line of the pattern. …

Member Avatar for stultuske
0
126
Member Avatar for Jwhispers

To add two times as you have listed, first add the seconds together. If the seconds > 59 you will have to use modulus (%) to find the remainder of the seconds. You can then use this information to figure out what the actual seconds are and that a minute …

Member Avatar for Jwhispers
0
264
Member Avatar for kitty7

You're off to a good start, here are some little tips/observations that might help you: 1/ Your header file should contain the structure definition as well as the function prototypes for functions related to that structure. So basically you should move the function prototypes into your header. Remove the last …

Member Avatar for kitty7
0
134
Member Avatar for spi02

Just 71C15 alone is over 914 trillion combinations. A normal computer can do about 1 billion/sec. This means it will take about 10 days to compute just 71C15. You might be able to do 71C7 or 71C8 in a reasonable amount of time.

Member Avatar for shaun.husain
0
102
Member Avatar for VirusTalker

Generally when you are doing recursion on any kind of collection of items (lists, arrays, even strings) you want to solve the problem for the first element of the collection, then recurse on the remaining part of the collection. For this example you can look at the first element of …

Member Avatar for VirusTalker
0
107
Member Avatar for nikhath

I think you're going to need to give more information about what you need to do.

Member Avatar for Ezzaral
0
75
Member Avatar for quocnam00

It depends on the platform. Since a pointer is an address, it must be big enough to store the largest address. I'm fairly sure that in windows addresses are 32bits (4 bytes). In linux/unix it may be different.

Member Avatar for Narue
0
179
Member Avatar for java_girl

You are right that the array name is the address of the first element of that array. This works exactly the same for arrays of char as well. In C, there is no "string" type, so we are forced to use arrays of char. There is one special difference between …

Member Avatar for Luckychap
0
233
Member Avatar for alip15379

Also try to reduce the amount of code you post. Just post the relevant parts. Add the exact error messages or example output to show us the problem.

Member Avatar for quuba
0
189
Member Avatar for efus

You shouldn't ever be returning the operators though, only the result of operations or the number value in the node. In the first branch, after you apply the operator to the two children, you should get back a double then return that. In the second branch you should be returning …

Member Avatar for efus
0
281
Member Avatar for hpdv2000

Sorting by hand generally means the teacher wants you to show the array after each step of the sort from start to finish.

Member Avatar for mahlerfive
0
68
Member Avatar for efus

Since you want to return a string, just save the string returned from each recursive call, plus the string of the data in the node you are looking at and add them all together: [code] public void inorder() { if(leftChild != null ) String s1 = leftChild.inorder(); String s2 = …

Member Avatar for quuba
0
101
Member Avatar for OutOfReach

You have allocated space for all of the studentInfo pointers here (except the last one, you should not be subtracting 1): [code]struct studentInfo *students[numOfStudents-1];[/code] But, you have not allocated space for the actual studentInfo structures that each pointer will point to. To do that you will have to make a …

Member Avatar for OutOfReach
0
120
Member Avatar for salman213

The above poster is not exactly correct. When you call scanf(), if the function fails (which will happen when you try to read an integer but it is given a character), it will not actually consume the input character from the input. This means the next time you call scanf() …

Member Avatar for Narue
0
127
Member Avatar for jhonnyboy

Let's look at a simple example of how you might do this. Imagine you were give the number 72061. The first thing you should do is determine how many digits there are - in this case 5. Now, you can divide by 10^4 (10 to the power 4, 4 because …

Member Avatar for Nick Evan
0
143
Member Avatar for munyandi

The reason people are discouraging you is because the very basics of this topic might be material for a senior undergrad course or a graduate course, and considering you said you were a semi-beginner programmer, you probably aren't quite ready for something of this magnitude. Before even starting to code …

Member Avatar for scorpious
0
146
Member Avatar for dmanw100

It should be [code]readfile >> sample;[/code] since you are getting input, not outputting.

Member Avatar for dmanw100
0
136
Member Avatar for waaliban
Member Avatar for mahlerfive
0
76
Member Avatar for ferret_90

The line [code]if (argv[1] == "/e")[/code] is invalid since you are compairing a char pointer to a string. To compare strings, use strcmp(). Also, if the user doesn't enter the easteregg argument, you don't want to check argv[1], so first check argc to check the number of arguments.

Member Avatar for ferret_90
0
78
Member Avatar for Ninabox

I just learned some MPI recently and I have a PDF with some basics about how to use it with C (and possibly fortran, i forget). Just PM me your email address and I'll send it over.

Member Avatar for Ninabox
0
121
Member Avatar for vijaysoft1

There is no real point in writing a "bug-fix class". Essentially the derived class will have to overload all the methods of the base class anyway - so none of the parts of the base class will be used. Either make a new class with the functionality you want, or …

Member Avatar for mahlerfive
0
87
Member Avatar for jyotis999

You can use the built in STL sort algorithm - [url]http://www.cplusplus.com/reference/algorithm/sort.html[/url] Just follow the example at the bottom where they overload the lessthan operator for the class.

Member Avatar for mahlerfive
0
234
Member Avatar for dmanw100

I have not used them, but I believe the boost library has threads and you can try pthreads as well.

Member Avatar for kux
0
154
Member Avatar for Evan M

I can guarantee you the problem is not winsock, it is something you are doing. Can you post a little code where you are having the problem, tell us what you are trying to send and what you are receiving?

Member Avatar for dmanw100
0
585
Member Avatar for atish00

First of all, if you want 30 strings of up to 20 characters each, then your declaration should be the other way around, and you need an extra char for each null terminator (the character that ends a string): [code=c++] char axx0[30][21]; // 30 strings of up to 20 character …

Member Avatar for Salem
0
323
Member Avatar for cam875

Vertices are the points or corners of a polygon. So a square is a polygon with 4 vertices, a triangle is a polygon with 3 vertices, etc.

Member Avatar for cam875
0
88
Member Avatar for OmniX

A lot of important questions here, so I will try and answer them the best I can. First, the main difference between passing by value and passing by reference.. When we pass by value, the receiving function obtains a copy of the variable. If the function then alters the contents …

Member Avatar for Alex Edwards
0
151
Member Avatar for utmibnca2004

As someone asking a question, I would much rather prefer answers to be short, few, and useful, rather than have everyone post answers and having to sort out which one is correct. In some things there can be debate (style issues and such), but on correctness there is no room …

Member Avatar for mahlerfive
0
145

The End.