- Strength to Increase Rep
- +15
- Strength to Decrease Rep
- -3
- Upvotes Received
- 490
- Posts with Upvotes
- 396
- Upvoting Members
- 230
- Downvotes Received
- 12
- Posts with Downvotes
- 11
- Downvoting Members
- 9
Re: nodeType *head = NULL; ... p=head; p->link=newNode; head is NULL, so p is NULL, so p->link does not exist. | |
Re: I don't see any code in the function readData that reads from the file edata.dat Start by writing a function that opens and reads data from edata.dat | |
Re: Rotate the mouse on your desk through 180 degrees. | |
Re: libcurl is a popular library for fetching web pages. Alternatively, just use the wget programme as part of a script to fetch the data, and then your C++ programme to operate on it. | |
Re: Wat is a card? It's an object that has a suit and a value from one to thirteen. So make a class named card that has two member variables; a value from one to thirteen (an int type springs to mind) and something to hold the suit value. Could be … | |
Re: If you're waiting for threads to finish, `join` comes to mind. http://en.cppreference.com/w/cpp/thread/thread/join | |
Re: &*raiz means "give me the address of the contents of the thing the pointer raiz is pointing to"; '&' is an operator. It's a bit silly, as by definition raiz itself equals the address of the thing it is pointing to. Saying "give me the address of the contents of … | |
Re: Where is the closing brace for the function `get_time_end`? Nowhere. That's where. | |
Re: https://www.daniweb.com/software-development/cpp/threads/499448/artificial-inteligence-system | |
Re: `char q1[0]` This makes no sense. Why is it this? it should be `char q1` Same for the others. `char a[0]={"b"}` This makes no sense. Why is it this? It should be`char a='b'`. Same for the others. `int k+1 ;` This is just completely wrong. It doesn't make any sense … | |
Re: If you want to store some kind of string, use a `string`. So those arrays of char arrays shouldn't exist. Just use an array of string. Or even better, a vector of string. `printf`? `scanf`? This is C++. Use `cout` and `cin`. What's going on with your headers? Are you … | |
Re: If those shared libraries aren't build with debugging symbols and you don't have the source code, there is no way to see the source code. Are they built with debugging symbols and do you have the source code? | |
Re: You're asking about a templated factory in C++. They start simple and go from there. Here's something to read: http://blog.fourthwoods.com/2011/06/04/factory-design-pattern-in-c/ If the only way you know what kind of object you want to create, though, is by reading a string, there's going to be no way around having to read … | |
Re: Your function `bruteforce`. I see that you set decrypt to be an empty string, so a string of size zero. You then start reading and writing to `decrypt[j]`. But decrypt is a string of length zero. Writing to the jth element of a string of length zero means you're writing … | |
Re: By "binary" I assume you mean a string in which each character is a one or a zero. Read in a char. Output four chars depending on what that input is, according to this table: http://www.learn44.com/wp-content/uploads/2011/08/Binary-to-Decimal-and-Hexadecimal-Conversion-Memorization-Chart.jpg So AA would be 10101010 | |
Re: `if((int)strings_line_tokens[l][m] != 10 || (int)strings_line_tokens[l][m] != 0)` This says: `if (true)` There is no number in the universe for which this statement doesn't come out `true`. The first part comes out as true for everything that isn't 10. For the one case where the value you're testing *is* 10, the … | |
Re: `return naa, aL, S, aLot;` You can only return ONE value. Just ONE. As it happens, you're not even using the returned value. You need to learn about the following: returning values from functions passing by reference | |
Re: Neither of these are anything to do with "reading file error messages". `return` ends the function, and goes back to whatever called that function. The program continues running. `exit` finishes the program. Everything stops running, the program ends. They do different things. Neither is *better* that the other. They do … | |
Re: In C++, protection is at the class level. A member function of a class can access the private variables of *any* instance of that class. | |
Re: Is line 62 to 76 meant to be a function defintion? There's no opening `{` What's all that from line 81 supposed to be? Is that meant to be a function definition? | |
Re: `second = (P - int) * 60;` This makes no sense. What are you trying to subtract from the value `P`? | |
Re: `buffer` is a char pointer, so `sizeof(buffer)` is the size of a `char*`, which is typically 4 or 8. If you passed in the number 8, then we would expect to see eight bytes written. One char takes up one byte, so we'd expect to see eight characters. How many … | |
Re: #include <iostream> int main() { std::cout << "RESULT: Good"; } | |
Re: When you call free, you must use a pointer with the same value as the one that was given to you by the corresponding malloc. Here is how to copy a pointer so that you can keep one with the same value. In this sample code, `pointer` is the pointer … | |
Re: > Does this mean C++ is inferior to other languages in its ability to truly implement data-hiding?? There's no such thing as a superior or inferior programming language; only the right tool for the job, given all the circumstances, and if you go around using words like that you'll annoy … | |
Re: What does it do that you think it shouldn't do, or what does it not do that you think it should do? You have to say more than "here is a problem". As an aside, you're including C headers for which there are modern C++ replacement version, and some of … | |
Re: Read a pair on integers? int a, b; scanf("%i %i", &a, &b); Easiest homework question ever. This thread can now be closed :) | |
| Re: Your number guess is wrong. You should be guessing a number from randRangeX to randRangeY. Instead, you're guessing from randRangeX to (randRangeX+randRangeY). |
Re: You have just reached the point where you are about to begin reinventing one of the standard tools of programmers; a Make tool. This, of course, is a good sign. I advise you very strongly at this point to take nobody's recommendation, including mine. Make tools are something that nobody … | |
Re: How much programming experience do you have, and with what languages? C++ is a low-level language; there are various definitions of what this means, but for the purposes of this conversation, it means that you have the flexibility and control to do an enormous amount with very few restrictions, but … |