- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 5
- Posts with Upvotes
- 5
- Upvoting Members
- 4
- Downvotes Received
- 3
- Posts with Downvotes
- 2
- Downvoting Members
- 3
black hair, brown eyes, medium built, male
35 Posted Topics
Re: Each of your cpp files have an int main()! There can only be 1 int main() in your entire program. Decide which of the cpp file have the int main() or introduce a main.cpp which only consists of int main(). | |
Re: This problem is hard coz' you need to find common denominators in decimal input with Roman Numerals as common factors. Then you output that Roman Numeral, subtract it with decimal input. Keep doing this until 0 decimal inputs are left. Outputing Roman Numeral is ofcourse parsing int from gcd() to … | |
Re: Not sure what you mean by IntBinaryTree when your data are in strings? A better tree design will be template BinaryTree<int> ? BinaryTree<strings> ? | |
Re: You try to emulate the original with what system resource you have. Also need to reverse engineer/intelligent guesses to what the intent of certain parts of the code does. | |
Re: Hi there, r,g,b should be values 0 < n < 255. If you have 255 straight for all 3, you get black! Which is doing what it is suppose to do, but not what your expecting. Could you just keep the r,g,b values and focus on propagating neighbouring pixels? | |
Re: Dunno about you, but my network admin would not allow root logins across the internet. In your case, better find out from your net admin which user account are allowed to connect to the port. | |
Re: I suggest you read Andrew Tanenbaums "Modern Operating Systems" book. You will realize how complex schedulers and interrupt requests occurs in the nanoseconds! | |
Re: I think you mean to output the BankAccount& to std::cout but forgot to call BankAccount::getAccName(); std::cout << db.findAccount("james").getAccName() << std::endl; Is what you need. | |
Re: 1. C++ Primer 5th Ed. Chapter 18. Section 1.3 pg. 953-955. There is an exercise there to practice this new technique. 2. No, technically the object is *not yet* constructed. Do the exercise 18.7 C++ Primer 5th Ed. Then stress test your object to your hearts content. | |
Re: http://www.sdltutorials.com/sdl-tutorial-tic-tac-toe | |
Re: Sun OS is scalable for thousands of file sockets simultaneously opened. You are better off with the server being on Sun Sparc. Windows could not hope to cope with that kind of work load. So why bother? | |
Re: Witcher III? They actually make a game for it. | |
Re: You know Public Domain Curses, libpdcurses.so will enable you to output interesting ASCKey characters besides '#' and '*'. Google for pdcurses. | |
Re: sdltutorials.com is a good start. If you don't like SDL there is SFML-dev.org. Again the tutorials from sdltutorials.com can be used in SFML with minor modifications. :wink: | |
Re: int *x = new int[10]{1,1,1,1,1,1,1,1,1,1}; // missing this: g++ -std=c++11 for(auto &it : x) std::cout << it << " "; delete x; | |
Re: will your calculator be able to convert Dec <-> Binary <-> Hex <-> Oct ? How many decimal places will it print 22/7 or pi? | |
Re: Normally, your IDE handles the Makefile for you. Since you said cygwin, i assume you know about Automake, Autoconf & Libtool. These tools will also configure your Makefile and do the necessary file linkages. However, there are licensing issues to consider when using the above tools... | |
Re: At Msys bash prompt, type export <enter> Cut and paste your environment variables here. | |
Re: Should have treat me buffet lunch while i configure/setup Netbeans C/C++ module for you. Now, do you get code highlights/auto-completes when you type "." or "->" following a class? | |
Re: **IF** your in Malaysia, I can setup Mingw32 + JDK1.8 (not the JVM) + Netbeans8 for RM50.0 or treat me to buffet lunch in 5 star hotel with wifi. We shall lunch and install/setup simultaneously and you will settle our bill. Agree? | |
Re: 2 byte increment please: for(int i = 0; i < fSize; i += 2) { char buf[2] = ""; aIStream >> buf[i] >> buf[i+1] >> flush; // Do something with buf[1st] & buf[2nd] here. } | |
Re: man ascii on my bash prompt provides the ascii table, the printable ones that is. | |
![]() | Re: http://www.sdltutorials.com/sdl-tutorial-tic-tac-toe This is what you need. |
Re: I would rather stick with C++Primer 5th Ed. Chapter 15, pg. 639-648. The design pattern works polymorphically and secure through private instantiation of smart pointers. | |
Re: It would take more than a semester to answer this one. I recommend reading 2 books: 1. Erich Gamma "Design Patterns" 2. C++ Primer 5th Ed. Besides reading books, do get involve in opensource projects for experience in class design and OO problem solving. | |
Re: You noticed the frequent occurance of check() with 1st arg differing types, yes? This is a prime candidate for template function in C++. Convert your c-style check() into check<T>(T 1st_arg, ...); That should improve code readability and encourage code re-use. Can you see other similarities in various scenarios of the … | |
Re: i was about to recommend SFML-dev.org or libsdl.org, but nevermind. | |
Re: How about a "partial" solution? Like how many days since the epoch, the year 1970 Jan 1, 7:00 a.m.? You have to limit the scope of your inputs somehow... | |
Re: Why do you want to continuously compound interest? It is theoretical text book stuff, in practice, it should be simple interest formula. | |
Re: You know cout uses operator<<, now you want to do the reverse, operator>> with your class Ticket. | |
Re: i was thinking of Unicode characters for representing card suits and other text line graphics. If you want a better representation of Blackjack, i recommend SFML. | |
Re: How far your game goes depends alot on the operating system, SDK and programming language. For instance, I ported an SDL tutorial based on Tic-tac-toe over to SFML and felt that further improvements can be made **if** SFML can simplify networking API (2 player mode) and/or Image class that supports … | |
Greetings all, I use MinGW32 for doing problems and have reach a point where standard malloc() would throw bad_alloc() whenever i call new. What other alternatives for Windows in memory allocation? | |
Re: void printBinary(char ch) noexcept { for(int i = 7; i >= 0; --i) if(ch & (1 << i)) std::cout << "1"; else std::cout << "0"; } int main() { int num = 56; std::cout << std::endl; printBinary(num); std::cout << std::endl; return 0; } return 0; | |
Re: Greetings all, some one recommended earlier to improve the parser, instead of handling char by char, the improved parser will handle entire tokens. Then a template function to convert string tokens into integers/doubles is used to handle all inputs. At present, my evaluate() only handles BODMAS, I think this program … |
The End.