Beginners - March 2013 (Page 20)

calculating age from date of birth and computer date
 
I have used the following to acquire the date from the computer and this works great. char*date; string reg_date = " "; time_t todayIs = time(0); //generat...
[1 reply] : http://www.cplusplus.com/reference/ctime/time/ The example on that pa... (by fg109)
If Then statements.
 
Im trying to do a challange problem in my C++ text book. I have to allow the user to input a quantity and if they are in range for 5 different areas apply a dis...
[1 reply] : if ( pack >= 10 ) // amount of discount based on purchase quantity { ... (by MiiNiPaa)
by krutuk
Problem with array
 
Hi everybody! I have a problem with an array. I really need somebody's help. Here is a code: #include <iostream> #define COL 3 #define ROW 5 using na...
[10 replies] Last: I am sorry for being late was solving another problem at less I hope w... (by closed account 28poGNh0)
This makes no sense? Please help
 
In my book Book, Ivor Horton's Beginning Visual C++ 2012 it says that the following is a lvalue reference? const int& refData = 5; Isnt it a rvalue ref...
[no replies]
Problem with else in Dev C++
 
I have this code: #include <cstdlib> #include <iostream> #include <cmath> using namespace std; void biggest (double a, double b, double c); int m...
[4 replies] Last: Thank you Techno01 !! You fixed my problem ! (by RadCod3Win)
Creating a Composite Object ...
 
I'm fairly new to object creation in c++ and need some help creating a composite object (utilizing has-a relationships). This is for an Arduino library I'm...
[2 replies] Last: I believe the "x" include will only search in the source files directo... (by SeaLyons)
How to refer to a method in another cpp file
 
I have this bit of code that I'm trying to make function, but Visual Studio is giving me error messages even before I compile (red lines): #include "Convert...
[2 replies] Last: Thank you, this worked perfectly. (by josephawad)
by mpack
Issue with operators?
 
I am trying to get a program to work for an assignment, but I can't seem to get anywhere else on it. The purpose of the program is to find a specific verse in ...
[3 replies] Last: @ vlad from moscow From what I know, wouldn't you want to make a switc... (by RadCod3Win)
Rectangle with "*"
 
Hi, I am supposed to make a program in which you give 2 numbers and those 2 numbers should be the width and height of a triangle made with "*". If I cin 3 and 5...
[2 replies] Last: Thanks it worked (by dude101)
by poziga
Structs, linked list (1,2)
 
I have a program that reads a file text.txt and contains filenames . When it reads a filename it opens it and makes sure if it is a png file. If it is I write ...
[23 replies] Last: Again, C++ is C. http://www.cprogramming.com/tutorial/c-vs-c++.html ... (by MiiNiPaa)
by Tax
What should I use instead of goto?
 
Hi, what should I use, instead of goto? I read some about functions and loops, but can't see any simple solution for this... #include <iostream> using namesp...
[9 replies] Last: Now a version using a vector, which can be considered as an array whic... (by Chervil)
Defining an object from another file that's not in the global scope.
 
I have 4 files, but I think you only need two to help me. Basically I have a vector full of "monsters" (std::vector<Monster> Monsters) in Rooms.h/cpp. I have th...
[3 replies] Last: Er, I'm confused. Do this? Monster.h class Monster { public: Monst... (by kong288)
One Last Question, and I then shouldent need anymore help.
 
I actually know my fair share of C++, were I learned just never explained anything about graphics, sounds(etc) Could someone give me a link to learn some of thi...
[2 replies] Last: Well I was using OpenGL for the longest time, and really it just wante... (by Joshrocksforeverandever)
I have a question
 
Please do not recommend any type of shortcut, I just want to tell my computer completely through my code, and my code only, with no use of OpenGL, etc. I was wo...
[4 replies] Last: Okay, thank-you so much! (by Joshrocksforeverandever)
Grade Calculator (Functions, Ugh)
 
Program compiles but writes "invalid letter grade" to file. Am very new to programming. // This program calculates a final grade using a formula, assigns a ...
[1 reply] : Return statemen will stop function immediatly. In your case problem ... (by MiiNiPaa)
i need some exercises...
 
hi to everyone... i am new to c++ programing and i used the tutorial and it was really beneficial... now i wanna do some practice... does anyone know how i c...
[1 reply] : http://www.cplusplus.com/articles/N6vU7k9E/ http://projecteuler.net/ (by MiiNiPaa)
Functions in classes
 
I am hesitant to post this topic because it is the second time today that I have posted with a similar question, but I really can't figure out what is wrong. I...
[2 replies] Last: Thank you so much! I can finally continue with this project. (by connorvba)
Strings
 
Is there any way of inputting strings till a certain character? cin inputs till space, getline till an enter, but is there a way i can define when it has to s...
[1 reply] : You can use std::getline. For example std::string s; std::getline( st... (by vlad from moscow)
problem with class creation. unresolved externals
 
This is supposed to create a class that inherits from the STL string class and use it to find word palindromes. I originally wrote it without the Pstring class...
[2 replies] Last: Thanks, I knew I was looking too hard for simple issues - Bobby (by lostcowboy)
I need a good compiler.
 
Hello everyone! I'm a beginner, and I need to know what compiler is the best? (I need a link for it if it's possible) .. thank you .. :)
[3 replies] Last: I am on Mac, and as a beginner I user a $10 app from the App Store cal... (by Cenmo)
March 2013 Pages: 1... 1819202122... 87
  Archived months: [feb2013] [apr2013]

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