Beginners - January 2012 (Page 28)

by Valz
when the number user key in is more than 999999 it dosent seems to work
 
#include <stdio.h> #include <stdlib.h> #include <conio.h> #include<math.h> int main(void) { int hexa = 16, deci , num , ans , quotient ,count=0; ...
[5 replies] Last: @Valz I noticed that if the user inputs a number higher than 999999 t... (by whitenite1)
Reducing fractions program
 
Hello, im writing a program that takes in a fraction i.e 4/6 and find the gcf of 2 and then outputs 2/3. ive already written some program for this. (so im not e...
[no replies]
what us the difference between the Debug/release
 
hey i was wondering what the difference between building in to debug and building in release.
[1 reply] : It depends on your IDE, but generally debug build do not have many, if... (by ModShop)
Custom Destructor
 
I have a container that holds pointers to other objects. These other objects are created dynamically outside of the container. When the container dies, I want a...
[4 replies] Last: +1 for std::unique_ptr<> or Boost's smart pointer. It is the way to g... (by webJose)
Undefined reference but it is defined.
 
I made this snippet to test whether or not the pointer would be destroyed when the A::add method goes out of scope. But when I tried to compile I got these er...
[5 replies] Last: Yes the vector will store a copy of the pointer. The pointer will "die... (by Peter87)
Password Confirmation Code
 
I've been trying to set up a kind of password confirmation code for fun. Containing strings and conditions. And I can only imagine this has 1001 errors that you...
[10 replies] Last: Passwords are often case-sensitive because it adds security. For a rea... (by Peter87)
Scanning 2 different vars at once then checking them individualy
 
Hey. I'm really new to scripting in C++ and I wish to know how to scan 2 variables of different types (float and char) and then checking them individualy. A...
[3 replies] Last: I meant something like scanning two different types of variables at on... (by ClayPigeon)
by Sabre
BEGINNER TRAP! Console input - Accepting string including spaces (eg. address)
 
In the interests of passing information on - something that stuck me for QUITE a while, hopefully it can prevent someone else going through this heartache! (EX...
[no replies]
Strings and modifyng them
 
I have the following exercise: 3. Write a program that contains four arrays. Three of the arrays should contain your first name, middle initial, and last name....
[9 replies] Last: strcpy is usually used when copying to an empty string. While strca... (by Wisely Done)
How will i do this? (A hint would be nice)
 
Hey guys im working on a assignment and im stuck at the last part now im not asking you to do it for me im just asking for at least a hint. now what the assig...
[4 replies] Last: If you know that arrival and departure have EXACTLY 2 ours difference ... (by eypros)
by Ch1156
Ofstream not working??
 
Ok so im making a simple GUI program that tests the user, its crappy right now but only meant for debugging. Ok so here is all of my code: Main.cpp: #def...
[2 replies] Last: Ah, crap i forgot i wasnt working with the std namespace :P thanks! (by Ch1156)
Simple Prime Factorization
 
Dear all, I am working through the C++ without Fear for beginners book and become stuck. I am up to recursive functions and prime factorization. Now i un...
[2 replies] Last: I could not get fun2code's explanation to run so I have been racking m... (by Kaon Flux)
subtitle time delay (school assigment)
 
Hello, in school I got this assigment to write a program that reads text from file and copies it to another file, removing the html signs. It should also be abl...
[3 replies] Last: There is no sleep() function in windows. Windows uses Sleep() func... (by Wisely Done)
Hi some questions about for loop
 
Hi, I have got some questions about "For Loop". I was working on my program in which I made a class of student. I wanted to have a "for loop" in it as ...
[2 replies] Last: You should use a syntax either: cin >> i; or cin.get(i); or i = ... (by eypros)
newing up the return of a function.
 
In SFML sf::Shape::Circle returns a sf::Shape . Here's the line of code giving me an error: sf::Drawable* cl = new sf::Shape::Circle(0, 0, 10, bColor, 1, ...
[2 replies] Last: Oh ok, I'll have to remember that, thanks. (by Croolsby)
by Ch1156
Need this code explained (1,2)
 
Hi, i opened a new code blocks project and wanted to explore win32 gui stuff but i dont know what most of this stuff means, i know the switch statement and al...
[35 replies] Last: Please Help!!!! (by Ch1156)
For loops help
 
i need to create a program that produces an amount of stairs based on the number user inputs. for example the stairs will look like this if the user enters 4 ...
[3 replies] Last: Please don't make duplicate issues http://cplusplus.com/forum/beginner... (by Stewbond)
Concering return and declaring varibles
 
In the code below; Why can't I pass the return of funtion1() to main() . I understand the error which states "x was not declared in this scope." but sh...
[1 reply] : Your value x is only declared in int function1() . At the end of t... (by Stewbond)
What is a good study method to use for C++
 
hey guys, i am fairly new to C++ i was wondering; what types of study methods do you guys use to learn this stuff.
[2 replies] Last: The most effective way to increase your knowledge is to try new probl... (by JLBorges)
by dotjan
proper use of ifstream and ofstream
 
Hi, I have a file which is used as database for user ID. My program look into it to see which is the last used ID and increment it by one before writing it agai...
[2 replies] Last: ¿Why don't just store the integer that you want, instead of the numbe... (by ne555)
January 2012 Pages: 1... 2627282930... 48
  Archived months: [dec2011] [feb2012]

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