Beginners - August 2011 (Page 33)

converting a string to an integer (problem)
 
In a project that I was working on, I was required to convert a string into a integer. I got this problem were whatever I input it will not accept as valid inpu...
[7 replies] Last: Thanks again for the help. I had no idea that I was abusing it. (by Hirokachi)
by efigen
bank account program
 
This is the main function of my homework assignment. What i am trying to do is loop the switch statement so it does not exit but instead allows me to choose ano...
[1 reply] : What you need to do to keep the menu options for a switch statement on... (by benedictusk)
Do-While Loop Implementation
 
I have an assignment where I have to create a program in which I use Stacks to evaluate post-fix mathematical expressions. I have to create the Stacks myself in...
[no replies]
How do you "equip" things? :D
 
First i would like to say that i'm new and have been learning for about four or five days now. I'm making a little adventure game (console window :D) and I wa...
[8 replies] Last: // dhjyu56.cpp : Defines the entry point for the console application.... (by blooddeal)
Reading 2 bytes from a file
 
hi there, i've an issue with reading 2 bytes from a file. This 2 bytes are number, and i'd like to save it in int. The first byte from the file is unimportan...
[7 replies] Last: Well, you need to google around bit-shifting and bit-masking in C and/... (by Duthomhas)
Problem setting a pointer in a constructor
 
I have a constructor that creates a linked list from an input string. Each digit of the input string goes in its own node in the list. The constructor works f...
[1 reply] : You are pointing to a local variable. When the constructor ends, the v... (by ne555)
How to use ifstream's read function?
 
I want to use the read function to read a section in memory froma binary file and then to tell me what is in there as an output. But I can't seem to find out h...
[no replies]
by zander
i want to learn c++
 
yes i do but the tut on this site does not fit my learning style can anyone suggest another tut or book with more in depth explanations yet simple altogether an...
[7 replies] Last: I recommend the websites within the below reference list. I've exclude... (by closed account zb0S216C)
How to name a program?
 
I'm kinda an idiot, I was wondering how to give a program it's own name, as in the top of the window would say (I'm too lazy to make up a name)
[5 replies] Last: At the very top of my window, it says "How to name a program?" on the ... (by Intrexa)
Apostrophe
 
I am trying to use the code below to check a file and capitalize the first letter of every sentence. The code works until it reaches an apostrophe. I think I a...
[1 reply] : What happens when you reach an apostrophe? Andy P.S. What system... (by andywestken)
by wtf
Function for getting operating system.
 
I found this function at: http://msdn.microsoft.com/en-us/library/ms724429%28v=vs.85%29.aspx #include <windows.h> #include <string> #include <sstream> #includ...
[3 replies] Last: Anyone know where the probably enums for PRODUCT_ULTIMATE would be de... (by webJose)
cin.get(); doesn't work, but system("pause"); does
 
So, my problem is that I would love to use cin.get(); instead of system("pause"); but it's not just working on application I just made. For previous it worked g...
[7 replies] Last: try this: void Pause( void ) { std::cin.ignore( std::numeric_li... (by closed account zb0S216C)
Problem with a program using a sequential access file
 
This is a class assignment that I'm having a little trouble with. This is my first time using sequential access files and I really could use a little help. What...
[3 replies] Last: You're most welcome -- please mark this as completed. (by kooth)
Check for duplicates in cstring
 
Hello all. I am writing a hangman game and have run across a problem. Basically, I am keeping track of the letters the user has entered to prevent the repeating...
[3 replies] Last: Ok got it to work. Here is the updated function. I would post the enti... (by Maese909)
space instead of enter
 
in some cases space can be used insted of enter key for example in the code below when you use space it goes to next syntax: #include <iostream.h> #include <...
[2 replies] Last: geekocoder if it is possible show me with a sample working code.i don'... (by behrad kiani)
iostream
 
#include <iostream> using namespace std; int main() { int a,b,c; a = 10; b = 12; c = a+b; cout<< c; } It says iostream is not found, is the...
[1 reply] : Hi! Your compiler *should* have come set-up to just be able to includ... (by Albatross)
by wtf
i'm just trying to write a simple mystring class but I keep running into one error after another.
 
#define dontdeletenodes #ifndef NODE_H #define NODE_H template <class thing> struct node { thing it; node * next; node(){it = 0; next =...
[10 replies] Last: hmmm not sure, think I planned on using caddress when calling c.str(),... (by wtf)
how to display user entered data in a list
 
Hi,I'm a new comer to c++.I'm creating a simple books catalog software these days.In my program users are allowed to enter following data.. book Title: (the us...
[1 reply] : Hi,I'm a new comer to c++.I'm creating a simple books catalog softwar... (by webJose)
Changing return types
 
Lets say I have this function: ??? fn(int n) { // .... } If n is negative, I want it to return a double. If it is positive or 0, I want it to ...
[3 replies] Last: You can use a template, with if-else conditions calling the specific t... (by Nisheeth)
by Mr Zen
How efficient is this code?
 
Hi guys, im a first time poster and a complete beginner with c++, I've written the following piece of code simply to familiarise myself with variables & functi...
[6 replies] Last: [quote=Mr Zen]Will it affect the overall program in any way? (sic) No... (by closed account zb0S216C)
August 2011 Pages: 1... 3132333435... 39
  Archived months: [jul2011] [sep2011]

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