Beginners - January 2013 (Page 10)

Volume of a Snowman scanf() help!
 
Hey, I am new here and was wondering if someone more knowledgeable could give me a couple pointers... I think the problem has to do with the scanf() function an...
[3 replies] Last: Thanks, I didn't expect so quick of a reply. I am using Code::Blocks w... (by makrsnak)
Search Using While Loop/ Infinitite loop problem
 
I am a bit stuck on this one. My loop gets stuck in an infinite loop when it finds the 'team'. Here's the code. //overlaoded operator bool operator == ( con...
[1 reply] : because "input" variable never changes after you found the team, so it... (by MiiNiPaa)
Functions.
 
i have written a program which adds and subtracts with functions (copied out of the book)the addition works. However when i call the subtraction function,it doe...
[2 replies] Last: [quote=Program Programmer] #include<iostream.h> #include<math.h> C ... (by closed account zb0S216C)
Writing, Reading, and Editing a Text File.
 
I'm currently working on a code for a business, which will track the items it sells and their prices, also keeping a log of all purchases made. The idea I have ...
[no replies]
Claculation issue
 
I have written this code and for some reason when the user inputs hours less than 40 i get different answers. I have done this type of code before and can see ...
[2 replies] Last: Delete (hoursWorked > 40.0); after else. It's breaking your program ... (by MiiNiPaa)
Conditional while loop confusion
 
Hi, I've written the beginning of a game. You move an '@' symbol around until the player either presses 'q' (which works fine) or moves to coordinates 9,9 (...
[9 replies] Last: Think I'll use your suggestion of (!((move == 'q') || ((x == 9) && ... (by dave146)
by vrakas
pow() function
 
this is a simple question. the pow function in math.h returns double. is there any problem using it with integer base,exponents like this: value=(int)pow(base,e...
[1 reply] : I would use value = (int)(pow(base,exponent)+0.5); The reason? casti... (by mik2718)
Why won't my program work?
 
It is meant to take in numbers and put them into an array then display the low/high/average using 3 functions I think I am having a brain snap because I can'...
[5 replies] Last: ¿what's the difference between `counter' and `up'? You may want to m... (by Tiger58)
i want to update records this code wroks some time but sometine not..please help me
 
void update() { tyre rec; char id ; int found=0; cout<<"\n\t\t\t*********************************\n"; cout<<"\t\t\t\tUpdate a record."; //heading ...
[8 replies] Last: sizeof(rec) == 60, so you are always seeking 60 characters backwards. ... (by bandicoot360)
Convert string to uppercase?
 
So I'm making a really simple rock paper scissors game in c++. I used to be able to convert my char variable to uppercase, but it did not allow me to add spaces...
[7 replies] Last: @Script Coder: You should simply do (*name) = toupper( (*name) ); ... (by ne555)
OOP basics
 
Hello all!!!! I have a task: The below program creates an object called “printer” in a class called “PrintClass” and then uses the object to print...
[2 replies] Last: Thank you!!!! (by maksims)
Paths in makefile
 
In an effort to try to learn makefiles I wrote this (the tabs are there but it doesn't show) C = $(CXX) CFLAGS = -g -Wall -Wextra -I$(SRC_DIR) -std=c++0x SRC_...
[1 reply] : Bump (by maeriden)
Ideas
 
Hello, i am new in c++. have 5 years to trying start it, i like it but... i cannot find any hook to start normal training. I need any simple idea, task to start...
[no replies]
by Skalbe
How to update variable values of a member function from a constructor that initializes them?
 
I`ve looked up all sorts of guides and tutorials on classes and constructors, but so far it hasn`t made sense to me how to implement the combination of both int...
[10 replies] Last: Derp. That solves original problem. Thank you for noticing that. M... (by Skalbe)
Add file to project
 
Hi, I want to add a file (.cpp file) to a project that I'm working on it now. My professor said to me there should be a "add file to project" menu item und...
[2 replies] Last: Thank you very much. (by r abbasi)
Input of username
 
I have an assignment to make a code that saves your username for a game. When I write what my username is, the only thing that is written in the .txt file is "0...
[4 replies] Last: You should have declared username as a string: #include <string> //... (by bandicoot360)
by Kaydee
cout not identified in methods
 
I have a class Establishment with methods introduction() and testPrint() in both of these methods i try to use cout and i get an "identifier cout is undefined"...
[1 reply] : figured it out! it requires std::cout and std::endl #include "REST... (by Kaydee)
i=0 is failing me
 
This is a vigenere encryption program for school. For some reason when i = 0 Things aren't working properly and I'm not sure why. Here's what I got. Every othe...
[no replies]
Reading from stdin to array
 
Hi. I've been stuck on this for hours and don't really know what to do. I have a file that I have to read from stdin. An example is M //map mode 4 //Each room...
[1 reply] : To read a commented line without problems: void readcommentedline(std:... (by gamemanj)
by craime
i want a project on how some market can sell there product using c++
 
you guys help me need some ideas
[2 replies] Last: i really i appreciate this! about my skills level i am doing my 3rd ye... (by craime)
January 2013 Pages: 1... 89101112... 52
  Archived months: [dec2012] [feb2013]

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