Beginners - January 2013 (Page 9)

char pointers
 
I am writing a program that calls the memory address of different variable types. I am having troubles with getting the address locations for my array and my ch...
[3 replies] Last: Thanks for the help and the info provided has helped me better underst... (by arcticman452)
Tips for this program?
 
This isn't asking for any certain instruction or anything. I can compile this program fine as it is (it isn't finished just doesn't have any bugs right now) ...
[1 reply] : Rather than using if every time you can use, if(choice == 1) { } el... (by HiteshVaghani1)
string concatenation, the hard way
 
Greetings people of cplusplus.com, I am working on a task wherein I am required to create my own strcat function, using the same function prototype as the c lib...
[2 replies] Last: Thank you very much, this is exactly what I needed... not sure why it ... (by quagnar)
Program with multiple choices
 
Im currently working on a basic program that gives you 6 choices to choose from and you choose by inputting a number that corresponds with that selected choice....
[4 replies] Last: Alright i'll try out the switch statement in a little 'exercise' progr... (by Xerogravity)
by stJohn
Firing a projectile straight to the target
 
Just a simple question regarding physics and maths in firing of projectiles. I've created this firing device and a target for it to shoot at. i am done with th...
[9 replies] Last: Normalize the position if the object, which will give you a vector as... (by pogrady)
HELP Random Number Generator help
 
I just really need to know how to make a function in which a random number is given, until it is stopped. I have tried, but since I am a very large beginner, I ...
[6 replies] Last: It sill does not work. This is what have so far... #include <iostream... (by SoulHero)
Reading from a text file.
 
The idea of this application is to read words stored in a text file. For example, I have a text file with three names on it, two separated by a white space. ...
[2 replies] Last: thank you (by Widget360)
Forward declaration of class
 
How would I go about forward declaring this class so i can use it in and cpp file? test.cpp #include <iostream> #include "test.h" Test::Test() { std::co...
[2 replies] Last: Ok I understand what i was doing wrong. I looked at another one of you... (by closed account D1AqM4Gy)
by Ch1156
My program is acting strange all of the sudden
 
Ok so i was making some minor improvements to my text encryptor program and for some reason when i start the program it doesnt ask for the password it just goes...
[16 replies] Last: That's because of L'Ѝ' which is two characters: U+00D0 and the un... (by Cubbi)
help with C-strings
 
#include <iostream> #include <cstring> #include <cctype> using std::cin; using std::cout; using std::endl; // Add your function prototypes here char...
[no replies]
Problem with "getline"
 
Hey, or better good night! I have a problem in a very tiny programm, which should just ask questions and list later the answers. But I have a problem when I'...
[1 reply] : cin >> iAlter; [...] getline( cin, sSchule ); You didn't consume th... (by Cubbi)
by clodi
Contact Management Tool question
 
Hello, I'm just about to write a Contact Management Tool program for me, myself and I. It's basically a contact list where I keep track of people, their number...
[4 replies] Last: thank you very much mate. Actually, I have been working on "ChiliTomat... (by clodi)
by Phazon
Why is this condition true?
 
short id = 1; std::vector<short>::const_iterator i = ign.begin(); if ((ign.size() > 0) && (*i == id)) { if (i != ign.end()) { i++; } } O...
[2 replies] Last: Ah, thanks for the help. (by Phazon)
Airline Reservation System
 
I am new to C++ and am required to build an airline reservation system (seems to be a common assignment). I have written pseudo-code with the help of a tutor bu...
[10 replies] Last: Having trouble writing the delete function. Comments explain what I'd ... (by programming girl)
by User1
Need help with Error
 
I need to make a program that takes user input and check for errors after all the data has been entered, I keep getting an error on line 37 : error: no match fo...
[4 replies] Last: Thank you very much, you have pointed me in the right direction. Che... (by User1)
enter not returning line?!
 
ok so now the only thing I need to know how to do is that if the return is hit and no entry is made in the initial input line the cin will return as zero and ru...
[no replies]
by mobat
Looping Iterator problem
 
I have code which looks like this: void Gear::equipArmor(Armor* &armor) { bool found = false; for(int i = 0; i < (int)Armors.size(); ++i) { if...
[2 replies] Last: Your problem is that you're using an integer for something an unsigned... (by Nexius)
Program to calculate failure loads of rc columns
 
Hi all, I am not new to c++. I took a module on computing 3 yrs ago. However, due to the lack on practice ever since, I am as good as a beginner now. Now in my...
[9 replies] Last: Hi Pogrady, sorry for the overdue reply. Thanks for your explanation.... (by yamehyameh)
by tpinon
string length validation?
 
I'm writing a payroll program. One of the entries is an Employee ID# that should be 6 characters long (ex: ABC123). I researched online and found a strlen valid...
[5 replies] Last: I changed it to a string array and it seems to work now. Thanks Chervi... (by tpinon)
setprecision not working
 
After data has been read in from a file, I have to set the balance to have 2 numbers after the decimal. The file was inputted into a stuct. Here's how the outp...
[3 replies] Last: It is a double. I'll just look over it and try a few things. I'll repo... (by sunnyxm)
January 2013 Pages: 1... 7891011... 52
  Archived months: [dec2012] [feb2013]

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