- Strength to Increase Rep
- +5
- Strength to Decrease Rep
- -1
- Upvotes Received
- 12
- Posts with Upvotes
- 10
- Upvoting Members
- 10
- Downvotes Received
- 3
- Posts with Downvotes
- 3
- Downvoting Members
- 2
- PC Specs
- Intel Core i5-750@2.7GHzATI Radeon HD58502 GB RAM (due to breakdown)2x640GB RAID0 + 1TBW7/Debian dual…
Re: Sorry if this has been posted before: [url=https://www.spoj.pl/]SPOJ[/url] especially tutorial problems. It can a bit challenging, since most problems are demanding algorithmically and SPOJ judges (yes, software ones) are pretty strict on I/O, but it is also pretty much fun. | |
Re: +1 for that WaltP By comparing maximal values (using Mathematica) uint32 will work up to 12!, uint64 up to 20!. Looking at IEEE 754-2008 and again comparing the values, long double (binary128 in IEEE 754) should work somewhere to the upper thirties, didn't check the exact value. But still, that's … | |
Re: @triumphost try Orwell's Dev-C++, that guy picked it up after all those years. And YES, the compiler is more-or-less up to date. | |
Re: If a non-portable way is enough for you, try the `system()` function from `cstdlib`, which works as though you have just typed the command given as a parameter in the command line. | |
Hope I don't start a holy war ;) This question rose to my mind after starting a project with a couple of friends (my very first team project to be honest). We all agreed on CamelCase, but one friend suggested somethin unnatural to me, that is, starting names of all … | |
Re: @rubberman: passing by value... not a good idea, unless the arrays are extremly small... Since someone already post their code, I'll post mine too. Since an array is essentially a pointer, an array of arrays is an array of pointers, so a pointer to pointer (as far, as types are … | |
Re: Try Orwell Dev-C++ - someone finally picked up Dev-C++ after all those years. http://sourceforge.net/projects/orwelldevcpp/ | |
Re: As for IDEs, you might try Orwell Dev-Cpp ( http://sourceforge.net/projects/orwelldevcpp/ )- this is the one most of my friends started out with, and it has seen some updates recently, like un up-to-date compiler ;P If you need some pre-made tasks, try some online solving system, like http://www.spoj.pl/ | |
Re: Depending on the game, there are all kinds of answers. If it's a Uni assignment, try Space Invaders - I've seen it written in under 500 lines of code, in a nasty way though. | |
Re: First, a lil bit of history and theory: since C++ is based on C, and C is a pretty low-level language, many things are closer to how computer does them, then they are to human's way. Arrays (or container) indexing is one such case. They are indexed beginning at 0 … | |
Re: WaltP isn't that OS-dependant? Anyways, Windows (at least W7) supporst slashes too. Another thing is, AFAIK if you supply the flags, you HAVE to specify the write flag too, so: walletfile.open("C:\accounts\wallet.acnt", ios::trunc | ios::out); should help too | |
Re: If you insist on using MS Excel spreadsheet, you could try exporting the data to csv and then re-importing it if your program changes that. That is IF Excel supports csv. | |
Re: IMO, you could just go by every single value and check if they're equal. Like when comparing strings. It doesn't really matter how you go through them, if the matrices are equal you WILL go through every single value anyways. And what you do just asks for bugs. Why not … | |
Re: 1. [ICODE]#include <typeinfo>[/ICODE] and [ICODE]typeid()[/ICODE] [URL="http://en.wikipedia.org/wiki/Typeid"]http://en.wikipedia.org/wiki/Typeid[/URL] 3. I tend to be wrong recently, but IMO an empty template parameter would incur a compile error. | |
I have to write an interpreter for tristate logic as a Uni assignment. I got most of the things down, like expression tree and such, there is just one thing that's bugging me, that is input, or a particular part of it. The thing is, in the expression there can … | |
Re: Tutorials (like [url]http://edn.embarcadero.com/article/31863[/url] ) are an obvious reply, but since I don't know much about UML, I can't tell whether they are good. The second part is nice software. Personally, I like the free [URL="http://modelio.org/downloads/download-modelio.html"]Modelio[/URL], which is IMO quite strict about UML (don't know if this is what you're looking … | |
Re: I'm not that good with streams and such, but you could try using [icode]istream::get[/icode] or [icode]getc[/icode] if you are using [icode]cstdio[/icode]. | |
Re: You give too little info here, but my guess is one of the two: you have an invalid or non-standard declaration of [icode]int main()[/icode] or you are trying to compile your own lib as an application (this can be changed in project settings). | |
Re: Maybe it is not really the case, but IMO the whole class should be a template, not just one function or member... Like: [code] template <class T> class Array{ public: T* m_array; } [/code] Although it's 3:30 am and I might've gotten this wrong. | |
Re: @_@ impressive list BitBit Well: C++ Fairly: Mathematica Barely: Pascal, HTML, CSS, XML, XSLT, XML schema Intending to learn a scripting language, pondering between ruby and python. | |
Re: You do not populate the people vector. This should work correctly, if memory serves: [code] std::sort(seznam_student,seznam_student+st_studentov,sort_by_name) [/code] Or just use a vector from the beginning: [code] std::vector<student> seznam_student; if(meni==1) { seznam_student.push_back(vpis(st_studentov)); st_studentov++; } if(meni==2) { for(int a=0;a<st_studentov;a++) { izpis(seznam_student[a]); } } if(meni==3) { std::vector<student> people; std::sort( people.begin(), people.end(), sort_by_name ); … | |
Re: According to Marshall Cline's C++ FAQ, which I really like, it is not if the code should be human readable. [url]http://www.parashift.com/c++-faq-lite/new/convert-to-c.html[/url] | |
Re: Ancient Dragon: there is actually a new version of Dev-C++, although not by Bloodshed. It contains MinGW GCC 4.6.2, so it should support most of the features even for C++11 ;) [url]http://sourceforge.net/projects/orwelldevcpp/[/url] | |
Re: Another one with ADD here. Still a CS Uni student. What I avoid: repetitive tasks. What I want to do: challenges, things that occupy my mind. So my job of choice would be with algorithmics and software engineering rather then coding itself. | |
Re: Also, a word of warning if you are using MS Visual Studio: VS has a lot of runtime checks built in their debug implementation of STL, so if you run it under debug it will most likely feel terribly slow. In my case it came out when I wrote a … | |
Hi there everyone :) Recently, I started to feel a strong need to learn a scripting language. The question is which. Right now I'm pondering between Ruby and Python. The conditions are that it should be high-level, object or object oriented and not a functional language. What say you, geeks? … | |
Re: W7/Cygwin Notepad++/g++ for smaller aps (such as helping out on the c++ board) MS Visual Studio 2010 Premium (bless my Uni and MSDNAA) for bigger aps (mainly due to debugger, I don't have the patience to learn or use gdb). | |
Re: 1) Mostly internet and friends, although books help too. Never got myself into reading others code. 2) Interested and challenged. 3) Pascal, due to school, then switched to C++. 4) Some basics of a few languages, but none enough to be useful. | |
Re: First of all, iterate over those powers, don't just put them in the code. Putting a number to any given base always used a [url=http://en.wikipedia.org/wiki/Greedy_algorithm]Greedy Algorithm[/url] and that is enough for you too. The only part, that could get tricky here is computing the modulus for floating point numbers, but … | |
| Re: Nice one, that :) Your number is 5-digit in binary. Based on that, in each guess, you set one digit of the number to 1, and then output all the possibilities for the other four digits (which are exactly sixteen), if the user answers 'yes' - you leave that digit … |