Beginners - December 2013 (Page 13)

Whats the difference between these 2 cout
 
What's the difference between cout << "You're awesome\n"; AND cout << "You're awesome" << "\n";
[5 replies] Last: The second code contains mistakes and will not compile. Lines 6, 8, 9,... (by Catfish666)
(Project Euler) Number of nCr greater than one million
 
I'm trying to solve Problem 53 in Project Euler. Here's the problem: http://projecteuler.net/problem=53 #include <iostream> using namespace std; int...
[8 replies] Last: There is no need to use integers as you only need to determine when th... (by ShodanHo)
by Nebur
Doubt about strings
 
Hey everyone I have the following question: When I want to create a string s of size k if I do it like: string s(k); I will get a compilation error. ...
[4 replies] Last: If you want strings with a precise size, you are then looking for C-St... (by Stormboy)
Asking a series of question - one at a time.
 
This program calculates the user's body mass index and tells the user whether they are overweight or healthy. I would like to modify the code so the program ask...
[4 replies] Last: @ NT3: I meant that the user can also input numbers like 50, 20 15... (by Stormboy)
anybody know how to see the ram condition when using "new".
 
I use "new" to allocate dynamic memories. I wanna know if the "delete" deleted the memories allocated. How can I make it?
[3 replies] Last: http://valgrind.org/ http://www.cprogramming.com/debugging/valgrind.h... (by MatthewRock)
by layanM
help agaiiinnnn urgenttt
 
plzzz help this assignment is due on sunday!! i spent a lot of time doing it! help plzz *Let us roll dice Write a program that simulates the rolling of two...
[9 replies] Last: thnk u soo muchh !! (by layanM)
by qutab
Preserving the values that the pointers stored in STL container point to (unordered_map)
 
I have a data structure as following struct routing { int color; //white = -1, gray = 0, black = 1 unsigned int d; //distance u...
[no replies]
by Hydrox
.txt to 2D Array: Extra values outputted, shouldn't create trace.
 
I've triple-checked, the amount of rows and columns of the .txt is definitely 17 columns and 105 rows. There is something wrong with the storing of the values i...
[1 reply] : I still can't figure this out. Help anyone? (by Hydrox)
Too too confusing~
 
#include<stdio.h> void main() { int i=10,j=5,k=3; k=j++ + j++ + j++; printf("\n%d\n%d",k,j); j=5; i=j++ + --j + --j; printf("%d\n%d\n",i,j); } Result is 15 8 9...
[11 replies] Last: The thing I said about choosing quicksort over other algorithms comes ... (by MatthewRock)
Using Loops
 
I'm trying to create a password prompt which only allows a user a certain number of entry attempts. Which loop do I use? Is the for loop only for numbers? AND...
[5 replies] Last: The format should be like: 1] Set a constant to the correct password. ... (by Stormboy)
Any easier way to do that?
 
I'm using windows 8 and my taskbar keeps filling up with games, so i decided to write a program from where i can open all of the games. I'm just wondering if th...
[8 replies] Last: just like what IceThatJaw said, use a text file to store list of games... (by nvrmnd)
by Outlaw
use of fstream
 
I'm using fstream class for input and output both. But it shows errrored output when im using it for both input output though it working fine with only one oper...
[2 replies] Last: When you're referring to the action of clearing the buffer of an fstre... (by Albatross)
by CDuck
wxWidgets 3.0.0 Error: "error: expected initializer before ':' token"
 
I am trying to compile a simple wxWidgets application that creates a window. I am using LinuxMint15, so the search directory I have for the include files is ...
[17 replies] Last: I cannot answer your question because I am not that familiar with anyt... (by CDuck)
while (cin.get(x, 10).get()) encounter a empty input NO quit loop, why?
 
i wish give a empty input to quit while loop, but get a keep looping result. doesn't a empty loop set a fail flag when given a blank line? char x ; while...
[6 replies] Last: Thank you! so here after cin.get(x,10) be set a fail flag, the .get w... (by q1670741824)
C++ Graphics
 
Is there any tutorial on how to use graphics.h in C++? Or can I use any other graphics in C++? If there is any tutorial then give me the link. thanks in adva...
[7 replies] Last: I would recommend Qt or SFML (2.0-2.1) as they are both easy to learn ... (by Cronnoc)
by Garion
string::find
 
I had a question about how string::find works More specifically if a particular use of it could lead to problems in the future. I'll post some code showing wh...
[1 reply] : Your code is probably ok. But I'd prefer to match the variable pos s... (by Chervil)
Help with passwd verifying program
 
Hi gays (i'm Artur from Italy), can someone of you help me? I started to study a C++, but i have some question, how can i color a single word for exemple i have...
[2 replies] Last: Thanks for answer, the problem is this way color all my text, i want t... (by iARTEMx)
Problem with string input check.
 
Hello, I have to write a function that will check if the string is legas or not. Legal means that only letters is allowed and the ','. So abc,AV is legal but a...
[1 reply] : I think yours is a little complicated than it should be. idk if you ar... (by Cody0023)
by binf
I need help..
 
How can I initialize a variable if the result may be even smaller than 0? for example I want to find the max value between these numbers: -10 -2 -8 during wr...
[2 replies] Last: If you are trying to find the highest value in an array than this is h... (by Cody0023)
Undefined reference in inlining function.
 
Hello fellow programmers. I have stumbled across a problem while compiling this code. It says undefined reference to 'radiation(int)' . Any ideas to help? Here...
[7 replies] Last: ok bro. Thank you very much for your time :) (by minuss273)
December 2013 Pages: 1... 1112131415... 69
  Archived months: [nov2013] [jan2014]

This is an archived page. To post a new message, go to the current page.