- Strength to Increase Rep
- +8
- Strength to Decrease Rep
- -2
- Upvotes Received
- 32
- Posts with Upvotes
- 26
- Upvoting Members
- 21
- Downvotes Received
- 5
- Posts with Downvotes
- 4
- Downvoting Members
- 5
Re: The problem can be solved using only one array in the following manner. I have also fixed a bug in remove where the sequence that I have given below in array was not getting converted properly. [CODE] public class arrayMod { /* I have statically populated the array. Leaving that … | |
Re: Check out [URL="https://computing.llnl.gov/tutorials/pthreads/"]this[/URL] tutorial. I have no idea about any books on the subject. However, several books have been listed in the reference section of the given tutorial | |
Re: Use the following function [CODE]void ListNode::add( double x, ListNode **curNode ) [/CODE] use [QUOTE](*curNode)[/QUOTE] in the above function wherever you are using curNode Use [CODE]curNode->add( *( tv + i ), &curNode );[/CODE] at line 40. Use [CODE]curNode = head;[/CODE] at line 42 to reinitialize your curNode to the head pointer. | |
Re: Please check the following. 1) Your file "max2sat_data" is present in the current directory with read permissions. 2) What is build_clauses returning? Is memory allocated to clauses when you are calling print_clauses? | |
Re: try putting the proper prototype at line 22. | |
Re: Take alook at the [URL="http://www.cplusplus.com/reference/clibrary/cstring/strcpy/"]strcpy[/URL] function. The C string will have a terminating null character. In the for loop,[CODE]for (indexer = 0;others[indexer];indexer++) [/CODE] when the index (indexer) reaches the index of this terminating null character , the loop will exit. Please use the CODE tags properly. | |
Re: Check the size of the library on disk and whether you have the necessary permissions to use it? | |
Re: The code is doing exactly what you have asked it to do. Your for loop on line 33 is the culprit. Remove the for loop and use [CODE]answer += values[sumnumber][columns];[/CODE] on line 37. (retain the inner loop) | |
Re: Do you and "omgaga" go to the same school? Same thing was posted some days back as well. | |
Re: What is the data type of address? Will the required data be always at the same index of address? | |
Re: The first thing that is wrong with your code is that you have not used code tags while posting. | |
Re: Kindly use code tags or you will not get much help from here. [CODE]}while(AreThereMore); [/CODE] The above line needs to be [CODE]}while(AreThereMore()); [/CODE] | |
Re: Instead of iterating over the string, you should be iterating over the array. Replace < str.length() with < arraySize2 Otherwise you are looking for only A & B. Also follow AD's point of multiple declaration. | |
Re: Your code does not compile. To solve your problem, remove the else part which returns 1. Add a initialised (true) flag in the function. Whenever an alphabet is encountered wich does not match your two conditions , set the value of the flag to a new value (false). After the … | |
Re: Lack of indentation makes this code impossible to read. It looks very much like you have one closing brace too many before the first error. It is difficult to say exactly since you have not posted your entire code. | |
| |
Re: Looks like your paste has expired. Why don't you copy and paste the code here itself? | |
Re: Can you use the following? [CODE] myclass *myobjptr; for(;;) { myobjptr = new myclass(param1,param2); //Code delete myobjptr; } [/CODE] This is not really a good way of doing things as it might result in heap fragmentation due to the frequent allocation and deletes of memory involved. | |
Re: Why don't you answer your questions with what you think is the right answer and why? | |
Re: [URL="http://www.cplusplus.com/reference/clibrary/cstdlib/system/"]Here[/URL] is a tutorial on system. Maybe this will help you debug the issue. | |
Re: @msgeek Please read the thread carefully. He/She has explained why your compiler might not be complaining. | |
Re: [QUOTE=ahmedyes;1176655] Your project must also include three separate files: a header file, an implementation file, and a driver/main file.[/QUOTE] As mentioned in the problem statement, it is your project. So you should be doing it yourself and approaching us for any issues that you face in the project. Try implementing … | |
Re: Commenting out line 25,26,27 should do it. (else part) | |
Re: [URL="http://www.cplusplus.com/doc/tutorial/files/"]tutorial[/URL] | |
Re: How are you compiling the code? Are you using manual commands from command line or are you using any Development Environment? Would it be possible for you to post the exact command used for compilation? | |
Re: Move the brace at 54 to 45 and the code resolves into a main function and a print function. Call the print function from the main to execute it. (print) | |
Re: [CODE] char letters[6]; int mem[3]; int i, j; letters[0]=65;//A letters[1]=66;//B letters[2]=71;//G letters[3]=77;//M letters[4]=78;//N letters[5]=82;//R letters[6]=86;//V [/CODE] You are accessing the array boundary here. Change 6 to 7 in the array declaration. | |
Re: Unless you give more information, it is really difficult to understand your problem. For the program to understand a question mark, you would need to use an escape sequence.'\?' Some more info on [URL="http://www.howtodothings.com/computers/how-to-send-an-escape-sequence-in-c-programming"]escape sequences[/URL] This is mostly meant for C. |