
please wait
by safoex
Shortest code a+b (1,2)
|
the shortest one that I know is: #include <fstream> main(){ int a,b; std::ifstream ("input.txt")>>a>>b; std::ofstream ("output.txt")<<a+b; } (if comp. allows... |
Jul 9, 2012 at 6:41pm
[20 replies] Last: @Peter87 I think it's fine to call operator<< and operator>> on th... (by vlad from moscow)
|
by Blessman11
Giving "main" and argument???
|
what does it mean when an argument is inserted inside main like this? int main(int argc, char **argv); |
Jul 9, 2012 at 5:57pm
[1 reply] : That's the commandline used to run the program. If, for example you... (by Disch)
|
by Blessman11
Assert(what argument does it take?)
|
what argument does assert take? The argument from a library, states below, won't run since it doesn't like the assertion of the pointer below. Why is it? ... |
Jul 9, 2012 at 5:35pm
[2 replies] Last: The error I get is below, apparently the iterator won't recognise the ... (by Blessman11)
|
by nothing3
Account balances
|
I am getting the error 'Account::credit' : must return a value... any help would be greatly appreciated. #include <iostream> #include <string> using nam... |
Jul 9, 2012 at 5:07pm
[3 replies] Last: Yay!! That was my very first helpful answer, whoo hooo! :) (by vanllabean81)
|
by johnwestman
What is the need of libraries?
|
If all libraries for c++ are written in c++ what is the need to build the source files into a library and then use them? It would make sense to build librari... |
Jul 9, 2012 at 4:51pm
[3 replies] Last: That's a great answer, Moschops! So helpful, you are. Lol. (by vanllabean81)
|
by chibamm
Interest calculator
|
Ok, trying to make a compound interest calculator that reads the input from a file then computes the total at the end. I'm having problems with my forumla as i... |
Jul 9, 2012 at 4:42pm
[3 replies] Last: So you want to calculate the interest on a specific deposit, then each... (by Phil123)
|
Program Skipping getline Statement |
I am working on an encryption code and am just about done. Now I just need to ask the user what to name the file that they want to write the encryption to. Howe... |
Jul 9, 2012 at 4:38pm
[8 replies] Last: (71) : error C2780: 'const _Ty &std::max(const _Ty &,const _Ty &,_Pr)... (by Phil123)
|
by AandR2024
How can I make a random response generator? (1,2)
|
I'm writing this program, and I want to know if there is a way to have it display "good" or "bad" depending on a random response generator. Thanks. #includ... |
Jul 9, 2012 at 4:11pm
[29 replies] Last: There is a few ways to do this. 1) int randomquestion = rand() % 4; if... (by Volatile Pulse)
|
My program closes unexpectedly |
I built a program that asks for numbers and you have to do tasks with them (add one, double). The first "level" works fine, but the second one wont start. What... |
Jul 9, 2012 at 3:54pm
[6 replies] Last: 2 things: 1- when you have this using namespace std; put it afte... (by ThangDo)
|
by Stauricus
"pass object around"?
|
hello everybody. i have a question that i believe it's very simple. id' like to know how to share a object between many functions. for example, let's consid... |
Jul 9, 2012 at 3:48pm
[6 replies] Last: I'm not sure I understand the question but, As long as you say "pu... (by sfBlackfox)
|
by Fransje
Meaning of Static and Const
|
Hi all! Could anybody please explain to me the meaning and use of the keywords static and const ? And the meaning of const in the following code: con... |
Jul 9, 2012 at 3:08pm
[1 reply] : In this context, it's signifying that the function is read only and do... (by MrHutch)
|
by ocunder
Calculator works.. but not with a loop
|
I have a do while loop in "setCalc". The code runs, but the program freezes and doesn't work after I ask for z (answer). It works perfectly fine without any loo... |
Jul 9, 2012 at 2:30pm
[4 replies] Last: there is no input... "input" never changes and will run forever with n... (by Jikax)
|
What could I improve upon? |
http://pastebin.com/04utKxbt What could I improve upon? Aside from the system call, which I will remove soon. Thanks guys. :blackhat: |
Jul 9, 2012 at 2:27pm
[14 replies] Last: Character *hero = new Character(ch == 1?"Gandorf":"Ashe", ch == 1?70:... (by ne555)
|
hi , can you help me guys |
hi guys iam not much in c++ but iam old in games programming by action script it all debend on the events so the function are so easy but here in c++ i got some... |
Jul 9, 2012 at 2:09pm
[6 replies] Last: here the question 1- add new patient 2- edit patient data 3-add new ... (by thunderxlight)
|
by ssegota
Skipping input of elements in line
|
Good day, I am writing a code in which it would be good to skip some elements in line from file that I use as input. For example: Let us say I have th... |
Jul 9, 2012 at 1:00pm
[no replies]
|
by Stas Kubrak
One container with different data types
|
Hi,could You help me: I would like to make container like array or vector with variables of different types (say int, double, complex, etc). The problem is i d... |
Jul 9, 2012 at 12:52pm
[1 reply] : You should look up boost::any which is an implementation for a heterog... (by Texan40)
|
by TakingSIdes
Basic Compiling
|
I have created a shell script to run and compile my c++ programmes. I'm pondering, if there are any reason to why this may be discouraged, or a bad idea? ... |
Jul 9, 2012 at 12:49pm
[3 replies] Last: Thanks for your advice, I didn't realise that's what a make file did, ... (by TakingSIdes)
|
by Fransje
Keyword this
|
Hi all! Could anybody explain the meaning and use of this ? I searched various websites, but I didn't find a clear answer. Thanks in advance! |
Jul 9, 2012 at 12:25pm
[8 replies] Last: Thanks all for the help! And thanks, computergeek, for the effort of w... (by Fransje)
|
by hombakazij
String Compare
|
This programm is asking the employee to inter her or his job category e.g"Technical Staff" or "Administration Staff" then the program should ask the years the e... |
Jul 9, 2012 at 10:11am
[9 replies] Last: @LovestoCpp its working.. (by hombakazij)
|
by lanse202008
how to change the bit depth of a bmp in c++
|
I want to chang a bmp with the bit depth of 16-bit into 8bit in c++, but I don`t know how to do. thanks |
Jul 9, 2012 at 9:59am
[1 reply] : You could use some kind of library, or get to know the BMP format, rea... (by Peter87)
|