Beginners - March 2011 (Page 24)

by GulHK
convert string to Year and Month
 
Hello everyone Could anyone please help me convert and string into Year and Month (not day)? The code I use for converting a string into a proper year-month-...
[no replies]
class???
 
Please, would you help me? I don`t know why this program doesn`t run. #include <iostream> #include <string>; using namespace std; class Item { public:...
[2 replies] Last: Errors are: error C2144: syntax error : 'int' should be preceded by '... (by pluscplus)
by dspain
deducting a percent based off a integer
 
i have been writing an rpg the last few years and when a player dies they have always lost a constant percentage of health like so: if(player .exp) { ...
[2 replies] Last: ill be darned, yeah exactly like that don't i feel like an idiot. i... (by dspain)
by dspain
calculating percentages
 
i know calculating percentages is simple common math we all learned in the 4th grade but im having a problem, porting it to code (man its been over 25yrs) ok...
[1 reply] : dmg would equal 1 always right? Actually, damage would equal 13 here... (by hanst99)
Printing Pascals Triangle
 
Hi guys i am new on C++ and I have a challenge i have to come up with a code(array) that can print out pascals triangle
[1 reply] : Yes. Now what's your problem? (by hanst99)
by Tankid
Separate integer numbers?
 
Hi every one There is a question that says: let the user input any integer number and then separate it and then add the individual numbers together for the summ...
[4 replies] Last: you cant. double is as most precision as possible. There's still lon... (by hanst99)
CByteArray and stl::vector question
 
I am removing some MFC stuff from a project and converting it to stl. I had a CByteArray which I have replaced with: typedef std::vector<BYTE> ByteArray; ...
[1 reply] : You also have to specify the number of elements to be inserted, in thi... (by hanst99)
Help with my first program
 
This is my code so far I want the program to chose between a diameter from 0.5 to 3 mm or 3 to 6mm and pick the correct tolklass and display it in cout diam ...
[2 replies] Last: Thanks for yor kind help. Thats was easy. Thanks once again (by Gubbedelux)
Constructor not accepting my agruement list
 
I have this writen in my main; double marks ; unsigned int Age; unsigned int ID; unsigned int CourseCount; char FirstName ; char LastName ; Course Cou...
[12 replies] Last: I set the warning level to 4 and 'treat warnings as errors' to true an... (by anonymous23323124)
Problem with Kernigan's example
 
I'm reading Kernigan's book about C lanuage and trying examples in it All examples before works fine but this one.. #DEFINE MAXLINE 1000 /* MAXIMUM INPUT ...
[7 replies] Last: SOLVED ) btw it was a good practice for gdb (was using it first time) ... (by janibeg)
counting letter grades from a file
 
hi for my assignment i have to make a program that will read grades from a file called grade.txt and counts the number of each letter grade. I did my code and i...
[1 reply] : but when I prompt the use for the file name, the dos window closes. ... (by matsom)
by clubt
Temporary change language of a cout
 
Hello everyone, I am currently writing an application that converts an input string or file of text to, what in Sweden is called, "the robber language". This...
[2 replies] Last: Well my problem is that I have created a "graphical" menu in the conso... (by clubt)
by jaxson
arithmetic operators
 
i'm beginner in c++ i need some help. i want to write a c++ program using overloading arithmetic operators (+,-,*,/,=,+=,*=,-=, and %). # include <iostrea...
[7 replies] Last: you are good (by jaxson)
iostream.h
 
I keep getting this error with my code: Cannot include file iostream.h no such file or directory.I cant seem to find the error. // Lab3ex2.cpp : Defines th...
[1 reply] : Try #include <iostream> ? (by oldnewbie)
xalloc class
 
In the tutotial(exception handling) I came accross "xalloc class".Author says it can be used for exception handling when memory allocation with new fails.Its no...
[no replies]
Random Number generator
 
7. Random Number Guessing Game (FOR EXTRA CREDIT – 5 points ONLINE SECTION ONLY) Write a program that generates a random number between 1 and 15 and asks the...
[2 replies] Last: I deleted for loop and initialised played to 0 .Then,in the while ... (by oldnewbie)
by PJam
boolean operators
 
Im having trouble understanding boolean operators, does anyone know a good/easy way to understand them?
[7 replies] Last: sweet, thanks (by PJam)
If Else If statements
 
Im taking my c++ class online, and can't figure out any of my codes. the teacher is literally no help at all, and the other students dont reply on the discussio...
[no replies]
by cc89
Passing strings as arguments
 
I'm getting weird runtime behavior with the MySQL C++ connector. I've narrowed the problem down but have no idea what's happening. header #ifndef DATABASE_...
[1 reply] : Update: I googled for a bit and found out that this issue might have h... (by cc89)
Loop Question
 
Im currently working on this problem Write a program that asks the user how many numbers will be entered and then has the user enter those numbers. When this i...
[5 replies] Last: do i need more for loops? and does this for loop even make sense logic... (by breebree)
March 2011 Pages: 1... 2223242526... 52
  Archived months: [feb2011] [apr2011]

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