Beginners - March 2013 (Page 35)

by myme
file handling
 
my program is a telephone directory, it is a list of content details includes persons name and his/her telephone number. My program should be able to add, edit,...
[2 replies] Last: what should i do? (by myme)
I am having some compiling problems.
 
I have this program: #include<iostream> #include<math.h> using namespace std; float a,b,c; int istriangle() { if(a<(b+c)&&b<(c+...
[2 replies] Last: Ok! Is a small error. In your void classify() function, at if(i==1)... (by osgwsy)
Reading in a sentence and end loop
 
I am trying to read in a sentence and end the loop with "done". It doesn't work. // #include <iostream> #include <cstring> // declare strle...
[6 replies] Last: Everything works! Thanks for the help Chervil. (by FenixRising)
How to assign value to member variable of BASE class
 
I am writing a program which has a class called Pizza, and it does various things to calculate the cost of a pizza, and outputs the description based on the var...
[6 replies] Last: Line 78 doesn't work because you need to go through an object to call ... (by TheIdeasMan)
by hejawi
Sand Clock with while
 
hello my friend i have a problem with a project that i work in my C++ lab how to a sand clock by stars with c++ using while loop ? ex. if the use enter the n...
[4 replies] Last: thx my friend i didn't think clearly in it because i have three exam t... (by hejawi)
by JakOrp
string to char conversion
 
I need to get a word from a file, display it, and then change some letters of that word and then display it on the screen. The problem is on line 15, i hope its...
[11 replies] Last: This is what i came up with, vivre how would you do it? I defined a ... (by vivre)
by fluffy
cryptic message help
 
This is suppose to take in a message and return it in upper and lower cade cryptic message . there should be the use of bool islower(char) abd bool isupper(char...
[no replies]
by valek
Number guessing game wont compile
 
This is my first attempt at using "if" and "else" (following the tutorial) Doesn't appear to be working. Any suggestions? #include <iostream> using namespace ...
[3 replies] Last: Thank you, removing the semicolon on line 9 fixed it. I can't believe ... (by valek)
Dungeon Crawl assignment (1,2)
 
I can't figure out why a monster is getting "stuck" on grid tiles (2,9),(3,0), and (3,1). If a monster moves into any of those three coords it will remain there...
[29 replies] Last: curses ncurses pdcurses (by closed account Dy7SLyTq)
by DiJey
Deleting Rows
 
How can i delete a row in a nested loop? if i have 5 rows, how can i delete the 3rd row?(or other rows?) ******** ******** ******** ********
[12 replies] Last: Here you go #include <iostream> #include <cstdio> #include <cstdlib... (by greenleaf800073)
Initialize const member in a class
 
Is it possible to initialize a const member in a class? Normally, I would make it static const and initialize it right in the .h, but in this case I don't wa...
[2 replies] Last: Thank you for the response! But does it have to be in the .h file? My... (by INeedAHero)
List All Prime Numbers problem
 
I wrote the following code to output a list of all prime numbers between 1 and 1000. It is not outputting 2 though. I understand why. The initial value of bot...
[5 replies] Last: Discussed earlier today: http://cplusplus.com/forum/beginner/96117/2/... (by booradley60)
URGENT HELP
 
Hello. I am a beginner and I have this code that has been killing me. Any and all help is appreciated. Its a cipher and for some reason it won't work. It op...
[10 replies] Last: while(getline(infile, x)) is indeed what's usually done in C++ t... (by Cubbi)
Coding newbie looking to share his pain
 
Hello CPP, Adam Schmidt here! Up until a couple weeks ago, I knew absolutely nothing about programming. I decided to tackle C++ as my first language (I know, ...
[no replies]
For Loop explanation!
 
Hi i have this for loop that out puts a square of "@" depending the size you want it. However I don't understand the loop, like when column is 1 what happens? ...
[2 replies] Last: oh great! much appreciated! (by sakonpure6)
Need a little hint, or nudge in the right direction.
 
Hi, After sheer frustration with this homework problem, I finally created a c++ account. Yes, it is indeed a homework problem and I'm not asking for the sol...
[3 replies] Last: for (int i=0, i<100&&check=true, i++) Look close. = is assignment =... (by Disch)
Importing data from a text file and doing something with it (Basic stuff)
 
This code will show the data from the .txt file "file1" the data is (0.0 0.1 0.2 0.5 0.8 0.9 1.0) What I'm trying to do is take these float values and add them...
[2 replies] Last: getline() and atof() will work, but it's more complicated than nec... (by Chervil)
Linked List
 
****How do I put my current code into a linked list** Put the structures in a linked list. The linked list shall be a head pointer, and a Node structure for ...
[3 replies] Last: As a starting point, in a linked list, you define a Node with the data... (by xkcd83)
Got an error that
 
#include <iostream> #include <iomanip> int main() { //declare variables int sales = 0; double commission = 0.0; //enter input cout << "Sales:...
[3 replies] Last: and you cant have .float. you need 0.float (by closed account Dy7SLyTq)
How to create simple c++ database on visual studio ?
 
Hello I wanted to make a simple database of Name , ID etc. please I want full illustration from A to Z REGARDS
[11 replies] Last: WOWOWO!!! hang on a minute.....I've created another prototype and It w... (by PureEvil75)
March 2013 Pages: 1... 3334353637... 87
  Archived months: [feb2013] [apr2013]

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