49,757 Topics
| |
HI All, Ant Unix method or C++ method is there to convert unix time stamp to system time stamp.The input is ULONG and out put should be in string. u can intimate to <email snipped> Any help is appreciated in advance. | |
This program adds up command line args (all of them ints) [code=c++] #include <iostream> #include <fstream> using namespace std; int main(int argc,char *argv[]){ int answer; fstream a; for (int q=1; q > argc; q++){ a.open(argv[q]); } answer = argv[1]; //first error for (int k=2; k > argc; k++){ answer += … | |
Hi, I'm facing a problem. I need the user to input a string, and then I have to add the string character by character to a queue so I can perform some parsing on it, I'm doing something wrong that I don't know. I've used sizeof(), length() and strlen() built … | |
Hi all, I'm fairly new to programming as a whole and so I would be grateful if you can help me out. I'm trying to write a program in VC++ or C++ that would intercept print jobs from another program and save this information in another file(to be formatted later). … | |
Hey guys, I am tying to get my program to work, I don't have any errors but I cant get an output from it. I am supposed to output the second set of three from the nine inputs. Thanks to those who reply. [code]#include <iostream> using namespace std; class TMoney … | |
I was trying to find ways to improve the loading time of an application that I'm working on. It uses SDL to handle graphics and sound which brought up a question: which takes longer to load? If I want to load either graphics or sound into memory during the application … | |
Hey, I'm trying to only read the int's and the symbol - (negative) from the file. right now my code is where m,d, and y are dates. Everything works fine. Except I do not read the - symbol. Any one know how to solve this? [ICODE] fin.open(ifile.c_str()); fin >> m1 … | |
I recently wrote a program to generate a tic tac toe game. The program should ask the user to select a number from the 'selection board', and this number will correspond to a spot on the game board. The user is playing against him/herself. I've encountered a pretty glaring bug … | |
This code Associates each number with cards, so 1 = ace of hearts/spades/diamonds/clubs, 2 = 2 of clubs/spades..... and so on so here is the code [code] void DeckToCards(int Deck[]){ //Sets each element into Cards; for(int i=0;i<52;i++) { switch(Deck[i]){ case 1:{ if(Deck[i]==1 && i<14)//Clubs char Aces_C[]= " A (of clubs)"; … | |
I would really appreciate it, I know html codes but I am new to c++ deal So if you could help me that would be great! | |
I have a problem with 2 Forms in a Form application. (Form1 and Form2) Form1 is my starting Form and Form2 is the Form I open from Form1. In Form2 I will execute a lot of code using backGroundWorkers and everything works fine here as long as this Form2 is … | |
I have run into an odd situation with linking files in my application. I have written a method that returns data for other methods. When I use this method(with in the same class) I get this error from linking. Any help with this is greatly appreciated [code] RetsParse.cpp: undefined reference … | |
Hi all. I'm getting back into programming and want to brush up so I was wondering if anyone has a reccomendation of a compiler I can download for free that will work for the vista64 OS. Thanks | |
hi, I wanted to know how to generate random characters, but more specifically , only A,Q,K,J. This will be for a blackjack game program. | |
[url]http://www.e-learningcenter.com/c_programming.htm[/url] Looks like it might be a pretty useful course and for only 69$. Before i spend the money, what do you guys think. Im not worried about the monetary value, but what kinda benefits i may get. I even noticed that thier copyright is up to date so this … | |
I have a problem with the MoveFile() function of the Win32 API. I cant move files which are in the same directory as the exe file,if i specify the pathname,it dosent work.I dont know how this function works.Need urgent help....... [code] # include<windows.h> # include<iostream.h> int main() { MoveFile("C:\File1.txt","C:\New Folder\File2.txt"); … | |
I'm trying to read from a text file.I think that everything is correct!It gives me this error message: Debug Assertion Failed! Program: D:\Test\sign.exe File: fscanf.c Expression: stream != NULL For information on how your program can cause assertion failure, see the Visual C++ documentation on asserts. CAN SOMEONE HELP? [code=cplusplus] … | |
Hi, I'm using FindFirstFile and FindNextFile functions to get a list of files from a path specified by the user. Let's say the current directory has a sub-directory named 'subDir1' which has a file named 'file1.txt'. myDir <- pwd |_ subDir1 |_ file1.txt Now, if the user enters 'subDir1\*' as … | |
I just need a direction to go with this.. a simple program that assists with unix and/or windows GUI creation. I have fairly simple program using classes, virtual functions and inheritance. The functions are all implemented by a switch w/ 6 options that call one of the functions. Now what … | |
Im trying to make this Hash Table to work, but I get these errors on linking time main.obj : error LNK2019: unresolved external symbol "public: __thiscall List::~List(void)" (??1List@@QAE@XZ) referenced in function "public: __thiscall HTable::~HTable(void)" (??1HTable@@QAE@XZ) StringTable.obj : error LNK2001: unresolved external symbol "public: __thiscall List::~List(void)" (??1List@@QAE@XZ) HashTable.obj : error LNK2019: … | |
i'm currently writing a program that needs one small piece in my opinion in order to work. i have an array which reads in a bunch of numbers (call them addresses, an example is "003124") and counts the amount of addresses at the moment. i need this to be passed … | |
Hi, i am in the process of trying to make a high scores table but i am failing miserably, i dont have a lot of experience in c++ and i was hoping i could get a bit of help trying to sort my code. [code]#include <iostream> #include <fstream> #include <string> … | |
HI I have a class className which is an abstract class. I am attaching the definition in the code snipet below. when I am writing the line I am getting an error error C2259: 'className' : cannot instantiate abstract class From this error I have understood that we cannot create … | |
I have to build a card game war in a C++ card game. The program must randomize a set of cards for both the user and a computer player. the cards are 2-14 for one array then a parrallel array for suit 0-3. then organize each hand in descending order … | |
These are the specifications for the assignment: Write the following members functions: (a) Constructor that creates objects of the student class. (b) read that prompts the user to enter from the keyboard student name, age and gpa. To terminate reading the user should enter the EOF (ctrl-D in Unix and … | |
Hello, I'm writing a simple calculator in C. The main problem is I need to parse string to evaluate for example 1+2*(3-1)/2.5. However writing such parses is a very hard task. This is a trivial thing Python using this code: [code] s = raw_input('Please enter expression:') try: x = eval(s) … | |
I'm trying to create an array that can be resized, and automatically renumbered, at the moment, what I have works for up to a 3x3 array, but anything larger than that doesn't work. I've tried doing this with int instead of char for the type or the array, but then … | |
alright. I have this file that lists about 3000 coordinates in this way. -90.0000 0.0000 220.7533 -90.0000 5.0000 220.7533 -90.0000 10.0000 220.7533 -90.0000 15.0000 220.7533 I'm trying to open this file in my program, but I'm having no luck at all. I've tried reading numerous threads on doing so, but … | |
Hi y'all! I'm kinda new to c++ so please excuse my inefficiencies. Anyways, here is the assignment: Write a C++ program to estimate the springtime count of deer in a park for 10 consecutive years. The population of any given year depends on the previous year's population according to the … | |
read in MYDATA (with a space) from cin and find MYDATA in the file, print the line if its there. The line is going to be MYDATA + string. [code=c++] int main (){ fstream filename; filename.open(av[1]); string name; getline (cin, name); lookeyLookey (name, filename); } void lookeyLookey (string& name, ofstream& … |
The End.