Forum: C++ Mar 9th, 2009 |
| Replies: 2 Views: 1,473 Hi. I have a program that goes a little like this:
// Include files, etc...
int main()
//code... |
Forum: C++ Mar 3rd, 2009 |
| Replies: 1 Views: 579 Hi. I am looking for a way to load the windows COMMDLG.DLL from my C++ program and open the print dialogue box. Thanks for any help! |
Forum: C++ Feb 26th, 2009 |
| Replies: 13 Views: 1,431 Thank you soooooooo much guys to take the time out of your day to help me with my silly questions. +1 reputation :) |
Forum: C++ Feb 25th, 2009 |
| Replies: 13 Views: 1,431 Ok then... Here is the latest code (with the thing that causes the runtime error):
class renewBooks
{
public:
int getItems()
{
cout << "Please scan the barcode of the book you would like... |
Forum: C++ Feb 25th, 2009 |
| Replies: 13 Views: 1,431 Ot, then, i tried to add days to my date by putting in:
newtime.tm_mday += 14;
and then, I got a huge runtime error. I took it out, and it was fine. Is there a better way? |
Forum: C++ Feb 24th, 2009 |
| Replies: 13 Views: 1,431 Thanks guys, you great. Now I have one more question... Is there any way to physically open the text file for the user to print and save as they wish after it has been wirtten to? If there is a way,... |
Forum: C++ Feb 23rd, 2009 |
| Replies: 13 Views: 1,431 Ok... so, I looked it up on themicrosoft's msdn website and this is what i wrote, but i still got ERREORS ! :@
Here is the code and the errors
class renewBooks
{
public:
int getItems()
{... |
Forum: C++ Feb 22nd, 2009 |
| Replies: 13 Views: 1,431 Hi. First, I program for the fun of it and to make things of use to me. Second, I did look up the function in the time.h file and all i saw was...well...gibberish. I tried adding another argument... |
Forum: C++ Feb 22nd, 2009 |
| Replies: 13 Views: 1,431 Hi. I'm making a class in an include file. I ran into some touble...When i try to compile, this is what comes up:
c:\...\renew.h(25) : error C2660: 'localtime_s' : function does not take 1... |
Forum: C++ Feb 1st, 2009 |
| Replies: 6 Views: 411 Hi. I actually figured it out...I got the code to compile and turns out that I was overloading the text file, so, i redesigned my code and it works fine. Thanks anayways! |
Forum: C++ Jan 31st, 2009 |
| Replies: 9 Views: 426 I know that this doeson't go with your *free* standards, but if you'r wi;lling to spend 25$ at borders or find it cheaper on Amazon of Ebay, I would HIGHLY reccomend C++ for Dummies. I'm still... |
Forum: C++ Jan 31st, 2009 |
| Replies: 6 Views: 411 Ok...It says that the file was accessed, but when it tries to access the information, it cant. Here is my text file.....
2010419735 Name Date1 Date2 Phone e-mail Pin $0.00 3 Hold 0 N/A |
Forum: C++ Jan 31st, 2009 |
| Replies: 6 Views: 411 Ok....I tried de-bugging the program before i did this post. I forgot all of the ifstream stuff and put a regular cout >> command. The program didnt even go on to that...
tempData is just the... |
Forum: C++ Jan 31st, 2009 |
| Replies: 6 Views: 411 Hi. I am making a program, and I have a main section and a class that the main section tefers to in a .h file. The Ifstream part wont work, and i dont know why. Please help.
MAIN:
#include... |
Forum: C++ Jan 19th, 2009 |
| Replies: 3 Views: 837 Thanks guys. I fixed it. :) |
Forum: C++ Jan 18th, 2009 |
| Replies: 3 Views: 837 I am having trouble using cin.getline and classes. Here is the code
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <fstream>
using namespace std;
class... |
Forum: C++ Jan 14th, 2009 |
| Replies: 2 Views: 486 Is there any way in a ifstream to change the font it writes in???
Thanks! Im using Microsoft Visual C++ Extended Edition 2005 on Windows XP |
Forum: C++ Jan 12th, 2009 |
| Replies: 1 Views: 332 Hi. I'm beginning to wonder if youre dreading my posts - they are so dumb but....
Is there a way in Microsoft Visual C++ Express Edition to compile the program and save it as a .exe file? Thanks! |
Forum: C++ Jan 11th, 2009 |
| Replies: 8 Views: 481 Hi. I was just wondering what you thought about C++ and windows development. I'll post a pie chart daily as long as people continue to respond.
The Question: What do you think about C++ and windows... |
Forum: C++ Jan 7th, 2009 |
| Replies: 7 Views: 398 Is it free? Microsoft Visual C++ express edition? |
Forum: C++ Jan 7th, 2009 |
| Replies: 7 Views: 398 Hi. I was just wondering if you had any opinions/recomendations on some Text Editors. Specific editors I was wondering about:
Dev-C++
Vim
Emacs.
Any input would be greatly appreciated. |
Forum: C++ Jan 3rd, 2009 |
| Replies: 3 Views: 560 |
Forum: C++ Jan 3rd, 2009 |
| Replies: 3 Views: 560 Hi, It's me again with another silly question:)
I was wondering if there was a way using ofstream to not erase the contents of the file it is writing to and simply write at the end.
Thanks!
P.S.... |
Forum: C++ Jan 2nd, 2009 |
| Replies: 11 Views: 3,208 It worked but I had to change
time_t now = time(NULL);
struct tm* tm = localtime(&now);
tm->tm_mday += 14;
time_t later = mktime(tm);
to
time_t now = time(NULL);
struct tm* tm =... |
Forum: C++ Jan 2nd, 2009 |
| Replies: 7 Views: 397 Thanks guys! That worked perfectly! And...If there was other informatin that needed to be displayed I'd just need to put:
LibraryDatabaseFile >> author;
cout << "\n";
cout << "Book Author: ";... |
Forum: C++ Jan 2nd, 2009 |
| Replies: 7 Views: 397 Yeah, I've used ofstream before but never the input. Also, would the text file just have to look like:
BillyBob = CAL 123.45
or something different. Any links/tutorials would be greatly appreciated |
Forum: C++ Jan 2nd, 2009 |
| Replies: 7 Views: 397 Hi again.
In one of my programs, I would like to put in a search type feature. I would like it, so if the user enters a book name, it returns the call number of the book. I would also like it ti... |
Forum: C++ Jan 2nd, 2009 |
| Replies: 6 Views: 605 Ok, sure thing. I'm using Windows XP and My complier is the one that comes with Dev-C++, Mingw I believe. |
Forum: C++ Jan 1st, 2009 |
| Replies: 6 Views: 605 Like:
string pword;
string pkey = "testing";
cout << "Please enter the password";
<<endl;
cin >> pword; |
Forum: C++ Jan 1st, 2009 |
| Replies: 11 Views: 3,208 Ok. I'm officially stupid today.
so you write
inline time_t addDays(int days)
{
return time(0)+86400*days;
}
time_t printNewDate(int days)
{
time_t newtime = addDays(days); ... |
Forum: C++ Jan 1st, 2009 |
| Replies: 6 Views: 605 Hi Again. I have a password field in one of my programs. I would like to display the letters as a *. Does anyone have some code to achieve this? |
Forum: C++ Jan 1st, 2009 |
| Replies: 11 Views: 3,208 so you would do:
struct tm* tm = localtime(&base);
tm->tm_mday += 14;
time_t mktime(struct tm *time); |
Forum: C++ Jan 1st, 2009 |
| Replies: 11 Views: 3,208 so would you just use something like
time_t mktime(struct tm *time);?
But then how do you add days? |
Forum: C++ Jan 1st, 2009 |
| Replies: 11 Views: 3,208 Hi. I'm new to the forums, and I have a quick question. I would like to add 14 days to the current system date in a program. Here is my code:
char date[9];
_strdate(date);
char time[9];... |