51,593 Topics
![]() | |
I have a new feature for my c++ console program. its an updater feature. the updater goes online to my website and downloads a txt file, then the updater reads the file, to see if the program is up to date. but theres a problem. the updater is a whole … | |
Hi is it possible to get the file creation date of files on the mac using c++? If so, may you assist me on how do I go about doing so? Many thanks | |
I am searching an efficient algorithm to find all the palindromes in a string(actually I have to find the largest palindrome in a string).. Here is my code [code] string palindrome(string str) { int n=sz(str); for(int l=n-1;l>=0;l--)//Palindrome can be of any size. { for(int i=0;i<n-l+1;i++) { int j=i+l-1; string str2=str.substr(i,j-i+1); … | |
[B] i need to find the user I/p is an String or char or int or float in C++ lang . [/B] My Goal is to Get 3 inputs from user and Find the Greatest of all and list out it but matter of fact the Big deal is the … | |
My biggest problem right now in understanding c++ is pointers. Im curious to its specific funcionality, so instead of doing somthing like p = &x then calling x using *p, why couldn't you just say x = p? Im pretty sure my syntax is wrong, but hopefully i'm getting my … | |
Hi, Please let me know if this post doesn't belong here... I couldn't find a dedicated forum for network programming, so posted this here. [INDENT]I'm developing a client and server for using Winsock/TCP/C++. I'm relatively new to network programming and have a few doubts :[/INDENT] [LIST=1] [*]Suppose I send 8 … | |
I have a c++ application in microsoft visual studio. Is it possible to create a button on a dialog that will pop up the device manager window in windows so that the user can see all the different hardware connected to their computer? If so how? | |
I'm working on this project due by 4AM and my loop keeps stopping after following part of a loop. I've checked the code several times, but it just freezes inside the checkstuff function. Can someone tell me how I can break from that fucntion or loop and continue looping through … | |
I'm having an issue that so that Book A and Book B's Author and Title will print at the end of the program. So This will verify that the overloaded = is functioning. #include <iostream> using namespace std; class Book { public: Book(char*, char*); private: char* title; char* author; public: … | |
do you know any articles which is like c++ for c# developers? | |
ok so i am almost done with this assignment but i keep getting an error on line 51 about my function i am calling. please help me! [code=cplusplus] //calculate energy bill part 9ish // #include <iostream> #include <string> #include <iomanip> #include <fstream> using namespace std; int i; void sort(int[], int[], … | |
Ok here is my assignment, i know its alot to read, but i would really appreciate the help: Write a program that asks the user for a file name. The file contains the part number, cost and quantity for up to 50 parts in the current inventory at a store. … | |
General question: If you want to create a homepage, wich application can you do this in ? I know C++ well but I am not sure if you can use Visual C++ Express Edition 2008 for something like this ? Does anyone have experience of this, What application could otherwise … | |
i have a c++ project and am using has-a inheritance ... the project is to create a class Sensor then makes is-a inheritance to classes Regular Sensor and CriticalSensor .. uptill now no problem ... i want then to create a class Building that (has) sensors so am using has-a … | |
[COLOR="Green"]Hello pleas any one helpe me in my code my code include error iam convert thise function to over loading(laste function) but include error Code:[/COLOR][CODE]bool Student::operator!() { if(!canRegisterMore()) return true; else return false; } bool Student::registerCourse(Course course) //thise function expline abilety of register course but you should //the 1 can … | |
Hi, I am mostly playing around with creating command line c++ applications, using the console for input and output display. I wonder if there is any "simple" way to create a web client interface on top of a simple c++ program, requesting data input and to display results on a … | |
Hello, I am having trouble understanding the output of the following program: [code=C++] #include <iostream> using namespace std; int main () { int a[5][6]; int b, d; for (b=0; b<=5; b++) { for (d = 4; d >= 0; d--) { if ((b+d)% 4 == 0 ) { a[d][b] = … | |
i am encountering a Linker Error: Undefined reference in my program under DEV c++ it invovles usage of the NTL class of header files. i have downloaded those files and have every header file existing in the required forlder of NTL. but still there are issues concerning the reference. i … | |
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& … | |
Hey I have to write a program that reads a text file that contains a list of words, 1 word per line. I have to store the unique words and count the occurrences of each unique word. When the file is completely read, I have to print the words and … | |
I'm working on a program that has a class Board, and two inherited classes that will implement different games, but I'm having problems with setting up the initial Board class. The problem is that I don't know how to make it so the board array in the protected section of … |
The End.