Reputation: 293 Architect
- Active Posts:
- 701 (0.45 per day)
- 31-May 11
- Profile Views:
- Last Active:
- Today, 04:54 AM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Favorite Gaming Platform:
- Your Car:
- Who Cares
- Dream Kudos:
Posts I've Made
Posted 29 Aug 2015I tend to do it without the libraries.
You're still using the standard library, aren't you? ; )
It looks like it a choice between you implementing a bignum library yourself, or reusing a solution that others have sacrificed years to perfect. Take a look at GMP, snoopy11 linked to it above.
Then again, implementing a simple solution (probably slow, compared to GMP or others) is kind of fun.
Posted 29 Aug 2015@Jim: yes... Since use namespace std was used and <istream> was included (in <iostream>).
My point is - it's not at all clear what it is, how it works and why it works, because the sample/rest of the post is lacking. Assumptions are made that might not be obvious to beginners. It's important to note that ws there is actually std::ws from <istream> (so it's available with <iostream>). Your first post in this topic was to the point and had lots of useful information - in contrast this fix from cplusplus.co was basically "Here, try this magic" which might work or not depending on what OP actually wants (which is also not quite clear, but that's a whole another issue).
Posted 29 Aug 2015
Posted 29 Aug 2015@up What's ws?
@op - it seems like according to what Jim wrote you need to look what's before the first getline - is it by any chance a cin >> something? Try making a small compilable program representing the problem, because we don't really have anything to work on here. What you posted isn't enough.
Posted 27 Aug 2015I started to learn C / C++ with Dev-C++. Simple compiler with no need to create projects and such...
I started learning programming with Atari C64 BASIC, but it doesn't mean it's the best way today. ; )
Dev-C++ is an IDE, and the work on the original was stopped some long time ago - the actual compiler that was bundled with it was GCC, the last build featured a pretty old version of it.
I'm aware that there are some forks with newer releases of GCC nowadays, but I think it would be quite important to point people directly to those when mentioning Dev-C++, and make them aware that other releases might ship with very outdated tools.
I think in the light of the above Code::Blocks is far better of a recommendation, or a separate installation of MinGW/GCC and some IDE like Eclipse, Code::Blocks, NetBeans (which is my favorite)...
- Member Title:
- Nasal Demon
- 29 years old
- March 20, 1986
- Paris, France
- Programming, IT, bits of cosmology and philosophy, history (focusing on WWII lately), s-f (Asimov, Lem, Dick...) and fantasy (Tolkien, Sapkowski, Le Guin, Modesitt...) books, good movies (Tarantino, Nolan, Polański, Scorsese, Kurosawa, Kubrick... and more), sometimes an anime movie or series (Ghost in the Shell, Cowboy Bebop, LoGH, House of Five Leaves, Mononoke, etc). I enjoy playing RTS and RPG games (that includes browser text-based fable-driven ones), and sometimes hunting my pals as an alien in AvP2, or playing as a platoon commander (or helicopter pilot) in Battlefield 2.
- Full Name:
- Tomasz Wota
- Years Programming:
- Programming Languages:
Pretty good: C, C++, PHP
Bit rusty: Perl
Can't remember a thing: Atari 128 & Commodore 64 BASIC, Pascal
Learning (or planning to): C#, LUA, Haskell, Scala
Thinking about glancing trough: Mathematica, D, Objective-C, Go, R, Clojure, Curl (not libcurl :P)