345 Posted Topics
Re: I too am confused about these kinds of threads. There's no way to answer the question without asking for details (Is this a business website? If so, what is the product? What's the business plan? What demographics are you targetting? Etcetera etcetera.) Lacking details, all one can do is post … | |
Re: There's more than one way to do this. Figure out what you want validateInputs to do. Right now it's grabbing the Strings from the textboxes, parsing them into integers, doing the division, catching exceptions, and popping up error boxes. Now, do you want it to also fill in the answer … | |
Re: >I reckon that if it wasn't mandatory I might even fill it in...properly I mean. What I'm saying is that users should really be able to bypass it rather than being forced to fill it in. That's a very good point. Radio Shack always asked me for my phone number … | |
Re: >I coded the solution to this many years ago and could determine if a number was prime up to 15 digits on an old 80286 / 80287 processor computer in a few milliseconds. Any chance you stilll have that code? Did you code it in C/C++? I would be interested … | |
Re: I typed out a long post, hit "Submit", and... I'm not sure what happened, but it didn't go through. To sum up, no one judges people by the volume of code produced, except possibly in a negative way, as in "This took way too many lines". Some people also take … | |
OK, so there's no problem, just curiosity. Looked at my User Panel and checked on a thread I commented in yesterday and it's gone. The +rep I got in that thread is gone too from my list of commented posts, and I have more up-voted posts in my statistics(63) than … | |
Re: Bookmark this site: http://www.cplusplus.com All the standard C++ libraries http://www.cplusplus.com/reference Line 15: Uncomment to "seed" the random number generator with the program's current time. You'll need the srand function from the cstdlib library: http://www.cplusplus.com/reference/cstdlib/ http://www.cplusplus.com/reference/cstdlib/srand/ (see the example) You are also using "time", so you'll need ctime. http://www.cplusplus.com/reference/ctime/ http://www.cplusplus.com/reference/ctime/time/ So … | |
Re: > what is any way to prevent the user from opening those inside the file? If a file is on my computer, I'll find a way to open it. Files that try to "prevent" me from accessing them are files that I don't want on my computer. Now as far … | |
Okay, I am trying to learn Windows programming and there are all sorts of new data types that I am running into and need to learn. I'm trying to understand the point of it all and failing. If there is no point and it's just Microsoft making things difficult for … | |
Re: > Shouldn't we discard the buffer with a line similliar to this: > > std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n'); Your line discards the buffer up to and including the '\n'. So does lines 13 and 14. The cin stream failed when the user entered a character that did not make sense for a … | |
Re: You might be talking about Microsoft's offer of free Visual Studio plus other freebies/discounts (i.e. Azure) for developers. You might not be getting the page because it only comes up if you are signed in to your Microsoft Account as a developer. Try this link... https://www.visualstudio.com/en-us/products/free-developer-offers-vs.aspx If you don't have … | |
Re: If it only happens when streaming videos, it's not completely "random". What operating system and what program(s) are you using? Are you streaming video on the internet with a browser? Does it happen immediately when streaming? In the middle of the streaming? At the end? Does it always happen when … | |
Re: > Can somebody explain to me in VERY SIMPLE TERMS why this thread is still going? Please stop posting here unless you have something really new or earth shatteringly useful to add. I don't have anything earth-shattering to add, nor particularly new, BUT I'll take the plunge and risk being … | |
Re: I have just bumped into this bug, I believe. I just posted in the "Trump" thread. After I posted, I was brought back to the first page. I see options to click on page 1, 2, or 3. I hit 3 and I get sent back to page 1. I … | |
OK, I programmed a few DLLs using Linux years back. My memory (and my memory could be faulty), was that I had the program decide which dll to load based on user input. So I had two dlls, each with a `string encrypt(string, string)`function. The user was asked to specify … | |
![]() | Re: > Thought I'd share a shortcut with you. You've probably seen Tampermonkey (or Greasemonkey) before. This one adds my favourite shortcuts to the DW nav: Very cool. I will admit that I am a complete noob on this stuff. In fact, I am not even a noob since "noob" imples … ![]() |
Saw some threads regarding this, but all from years ago, none since the new rollout, so here's a new thread. Checking out my profile, I saw that I had a downvoted post! Me! After crying for a few minutes, I click on the red "thumb down" icon to see which … | |
Re: > i am serous fyi No, you're not. > its u who is not understanding the question. Everyone here understands the question: "Will you write a program for free for a complete stranger who is too lazy to type 'please'?" Out of curiosity, is this one yours too? http://brainly.in/question/437417 And … | |
Re: The validatePLU function appears to return true regardless of the string. I see no "return false" anywhere in it. Which makes your statement here seem odd: > for some reason it asks the user to again enter the string even if the user enters a correct string. Please tell me … | |
Re: I'm thinking that line 4's write may be ostream's write: http://www.cplusplus.com/reference/ostream/ostream/write/ If so, f would be an ostream and line 4 writes the contents of object a to a file or to a socket or wherever. It would be consistent with common usage of ostream's write function, plus people often … | |
Re: I wrote the post above prior to our interaction in another thread, where a lot of things were clarified by you. I'm satisified with your clarifications and believe that you are in control of security and are being responsible with the personal info entrusted to you. I'm not going to … | |
| |
Re: > Privileges can be revoked here: https://www.dazah.com/users/settings 1. Navigated to https://www.dazah.com/users/settings 2. Permissions are granted, according to text. Clicked "Deauthorize". Permissions dissappear. 3. Clicked "Log Out" 4. Redirected to https://www.dazah.com 5. I see no option to log in or log out on this page ( https://www.dazah.com) 6. I navigate to … | |
OK, now I'm getting nervous. I'm logged in as AssertNull finally (hooray!). I had a temporary throwaway account, Derek_8, that I created due to the rollout snafu's. I just saw a big green "Sponsored" icon next to "Derek_8". I can't think of any reason I'd have that next to Derek_8. … | |
Re: > hi,i'm beginner for programming and i don't know how to use pointer in a c++ programming. Is that just a statement or are you looking for a good tutorial on pointers? First result from googling "C++ pointers tutorial" is below and is a good one. http://www.cplusplus.com/doc/tutorial/pointers/ | |
![]() | Re: No clue on the destructor error, but I get linker errors if I keep ALL_BOARD_TERRITORIES and COUNTRIES_BORDERING initialization in Territory.hpp. I stuck them in Territory.cpp. I also had to stick `std::vector<string>` in the ALL_BOARD_TERRITORIES initialization 6 times (i.e. once per vector. Array has 6 vectors. 6 times). See below. This … |
![]() | Re: I created a project in NetBeans and compiledwith -std=c++11. You don't provide a main or the Territory files, so I made those and got it to compile. Obviously my main and Territory files were bare-bone, so potentially there could be problems when you compile/link the real ones. Here's what I … |
Re: How about this? We try not to give complete answers, but it's so short... int minarr(int n, int *arr) { if(n == 1) return *arr; int minAllButFirst = minarr(n - 1, arr+1); return (*arr < minAllButFirst ? *arr : minAllButFirst); } | |
Re: > New furtive way to get homework done? I learned a new word: furtive! What a cool word. I intend to use it often. This is where I really wish I knew how to use Google or the other search programs better. I want to test my theory that Stephen … | |
Re: I'm not familiar with the Factory Method, so I won't offer advice on how to implement that. You're getting the seg fault because you are deleting cobj, then trying to dereference the deleted object. That won't work. As for what WILL work, if you simply delete line 127, that should … | |
Re: There are lots of real-world collections of objects that relate to other types of objects in different ways. A very obvious example would be Organism, with subclasses Animal, Plant, etc.. The Animal class would contain Vertebrate and Invertebrate classes. Within the Vertebrate class you have Mammals, Reptiles, Fish, etc. then … | |
Re: Competitive programming, as in you are given several problem statements, an input file, and you have X time (i.e. two hours) to do as many problems as you can? You are judged solely on getting the right answer? If that is the scenario, understand up front that your goal is … | |
Re: > it seems to be assignment doesn't work with pointers . > i tried to use unique_ptr by transfering the ownership from a to b but it doesn't work. It's giving you an error because what you are trying to do makes no sense (to the compiler and to me). … | |
Re: Here is a C++ implementation. // The goal is to move everyone from the west side of the river to the east side of the river // // Restrictions: Farmer must always stay with the boat. Farmer can take at most one passenger // in the boat. Duck and corn … | |
Re: My head hurts just looking at this. I can't follow code like this. You need to format/indent. You also need to decide whether you are programming in C or C++. You're using iostream, so it must be C++. So you want to include cstdlib and cstdio, not stdlib.h and stdio.h. … | |
Re: Line 6: `B[k++] = A[j];` This is the only place where B[] array is set. Let's say that B[140] is equal to 500,00 and B[165] is equal to 1,000,000 after the B[] array is created on line 1 (could be anything since you don't initialize it). What is the value … | |
Re: If you need to count the leading zeroes, you can't use Scanner's nextInt by itself because it skips the leading zeroes. Either read the input in as a String and iterate through the String counting leading 0's, then converting the String to an Integer, or use Scanner's `hasNext` function along … | |
Re: > Is there any design flaw with this code ? Yes. Line 90 creates a new object. obj in the Draw class is a pointer to an IShape object. If obj does not point to anything, it should be set as NULL. If it does point to a real IShape … | |
Re: > This is the method that calls the private method: I see no call from the public printAnagrams function to the private function printAnagrams? I see no call anywhere to the private printAnagrams function. What am I missing? I see a recursive call from the public printAnagrams function to itself … | |
Re: #define size 50 //minimum input 50 You're asking for trouble #defining size to equal a number (or anything else). You got away with it here, but what if you had a program that used vectors and you wanted to use vector's size function? vector<int> intVector; cout << intVector.size(); Preprocessor changes … | |
Re: I'll start you off, but I'm not doing all of it. Write a few helper functions, one function for every type of gate you have. I'll give you the NAND gate function. Make sure you either #include stdbool.h in order to define true, false, and bool, or don't include stdbool.h … | |
Re: Read the error messages carefully. They'll tell you what the compiler is complaining about. In particular, the line 13 error: > error: call to super must be first statement in constructor This was actually a blessing in disguise. It forces you to learn what's happening with the `super` constructor call. … | |
Re: > I can't figure out why it is not working Too vague. It's your program, tell us what's going on. Does it not compile? Does it compile, then crash? Does it throw an Exception? Does it run to completion, but produces bad output? If so, what? What command line arguments … | |
Re: I've never heard of or used a fiddle before either. Just googled "C++ fiddle", picked the top result, then kept clicking my options for C++ and within 15 seconds, I got to a screen where I could copy and paste your code and compile. Showed the errors, commented the bad … | |
Re: >Why would I? Why wouldn't you? Your premise is that Hericles "owns" very high quality land, perhaps better than yours. "Owns" is in quotes on purpose because without people in authority issuing deeds,without laws saying you can't just take someone else's land, without police to arrest you if you do, … | |
Re: I was going to copy and paste it into Babbelfish and see what the Hebrew to English translation was, but it's a photo so I can't. For a solution, you'll have to hope someone who reads Hebrew sees this thread. Or here's a thought. Presumably YOU speak/read/write Hebrew. Maybe YOU … | |
Re: > What the heck does "one toss of a die is equivalent to one experiment. In one experiment a die is rolled 50 times." mean? Dusting off the cobwebs of my statistics coursework long ago, I believe most statisticians would rephrase that sentence as: > one toss of a die … | |
Re: Yes, especially the "and so on" part. Google "and so on". Lots of hits. Sorry to be sarcastic, but really, did you google these topics and not get any worthwhile hits? Wait, I'm not James or Stultuske. Guess I shouldn't have answered. | |
Re: No comment on the curses library since I've never used it. I tried following the logic of what you are trying to do, but I can't quite get it. This line: strncpy(range[numRatesSets], range[numRatesSets], 4); copies a string to itself, at best. It seems to me that numRatesSets is supposed to … | |
Re: Read the error messages. Look at the strcpy_s requirements. How many arguments are you supposed to provide? How many do you you provide? Are they the same? |
The End.