- Strength to Increase Rep
- +9
- 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
107 Posted Topics
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. | |
Re: Pseudo code. First line first element is always &. else if not the first line, but the first element ( we need to print out variable amount of * based on the line number) output linenumber-1 * and then an &. else (now worry about placing the & at different … | |
Re: Instead of calling the function caclulateGrade in main, you are redefining it there. Replace the below two lines in main with [CODE] int enterTotalQuestions(int tot_quest); double calculateGrade(double grade); [/CODE] the actual function calls. I can't give you an example because I would have to rewrite most of your code and … | |
Re: Please post the relevant code that you have tried so far. Looking at the problem statement that you have specified, you can see a pattern. (The semicolon in the statement.) You can use that for identifying a LOC, right? Using such patterns, you can accomplish your objective. | |
Re: take a look at line 35. You are trying to use an integer as though it is an array. | |
Re: If it is a csv file, I believe you can read it just like a text file. | |
Re: First of all please use code tags and proper indentation. Check the exit criteria of the last two while loops. Are you doing anything to modify the elements checked in the while condition? Will the condition ever be false? | |
Re: You can call the function immediately before you call cleanup either by itself or after checking for count. | |
Re: [CODE]int days[12]={31,28,31,30,31,30,31,31,30,31,30,31};[/CODE] Try with the above modified days array. | |
Re: I hope your prof has helped you. If not, could you post the entire code? (with inputs given) | |
Re: Didn't you see the first reply to your post? [URL="http://www.cplusplus.com/reference/clibrary/ctime/asctime/"]asctime[/URL] returns a character pointer. The currentTime function returns a character. There is a mismatch here that needs to be fixed or taken into consideration. | |
Re: They are all pointers to Node. (Node*) | |
Re: You are passing by value. Try passing by reference. | |
Re: Try allocating memory to your dir variable. Similar to the command variable. | |
Re: Think about the flow. How was the goto working? Does the while loop take the flow the same way? You need the flow to reach back to the cin. For that you need to include the cin also in the loop. | |
Re: You need to define the functions at the top of the file or in a header file and then include the header file. | |
Re: 28-31 [CODE] void setY(int n) { x = n; }[/CODE] This should be [CODE] void setY(int n) { y = n; }[/CODE] Please check for more errors. | |
Re: You are expecting smallResult to be populated by the sumOdd function without calling the function. For the code in sumOdd to be executed , you need to call the sumOdd function from the main function. | |
Re: double stands for double precision floating point number in C++ |
The End.