49,761 Topics
| |
Hi all...I really need someones help and real fast. I am trying to read a textfile with multiple columns that are each separated by a #. eg: Inventory.txt Nokia Lumia 610#Nokia#Touch#8GB#8#Tango OS#3899.00# Blackberry Curve 9380#Blackberry#Both#1GB#8#Blackberry OS 7#3499.00# Samsung Galaxy S3#Samsung#Touch#32GB#8#Andriod#6999.00# iPhone 4S#Apple#Touch#16GB#8#IOS#7899.00# I am trying to save each bit of … | |
I'm missing something obvious here I think I'm trying to check for the existence of a file, and I hear this is possible with ifstream's .good property. Not even managing to get that far. Forgive me on this, I'm new to C++ Created a new VS console application. I then … | |
iam having my end term oops symester,iam much intresting in doing the project of intercom chat systrm via intranet,iam in in 3rd symester and going to get familier with java with in somedays days,moreever iam much familier with c++,so do you thing i could do this project as being java's … | |
this error window is all the time on my desktop, closing it it comes back immideately. how can I solve this error problem`? thank You. | |
This code should read in some data from sector zero off of a USB flash drive, then print out some of the data. However when I run it there is nothing that was put in the buffer. int _tmain(int argc, _TCHAR* argv[]) { int ReadSect = 0; char diskname[60]; sprintf_s(diskname, … | |
I need urgent help in my project as i am getting exception 13 error & that also at such a crucial time when i have to submit the project day after tomorrow...please help and tell the mistakes and their will be some mistakes. the source code is as follows: #include<fstream.h> … | |
* ** *** **** ***** for input=5 How i can print this by using only one for loop with if else statement. | |
I'm still stuck on my number guessing game. (The program guesses the number the user inputs)I have wokred out some kinks but i am stuck again. I have a bunch of stuff but i am focused right now on getting the program past asking if the first guess of 50 … | |
I am studying performance analysis and character instance gets brought up a lot. I am unclear to what this means. It also talks about functions of instance characteristics. Can someone elaborate? | |
I have an usb-camera with its drivers and dll with some funtions to use this camera in my solutions. I want to use it in any wide-spread applications, to be able just to choose and use it in Skype, for instance. So. I want to develop some soft that will … | |
Is it possible to set Environmental variables other than the ones set by default. I am trying to build an application though it keeps on telling me that it needs a file from another directory which doesn't seem to be in the include path. I am using a Mingw compiler … | |
Good Afternoon, I'm having a little trouble with a class. The error that I'm getting is: a nonstatic member reference must be relative to a specific object in the function void B::printStatic() { cout<<"size is "<<size<<endl; Here is the code that I have. #include <iomanip> #include <iostream> #include <string> using … | |
I have this assignment to make an infix calculator I think I have all the logical things figured out, but I am having trouble converting values. the return is a double, but the read in is a string and outputting as a double, I know that there is the difference … | |
I am thinking of writing a path_name_class that would be easily adaptable to any file system, but I have run in this difficulty: it appears that some file systems allow **ALL unicode except null** characters in their directory entry (this is the case for example for exfat and many others … | |
Dear all, I am certainly not an expert in C++ development but after some time, I had some code running and compiling for a bio-informatics tool. As always in Science, I changed my area of research of a while and when I came back to my tool, I had changed … | |
#include<iostream.h> #include<conio.h> #include<string.h> class X {public: int a[50],n; char b[20]; char name[20]; void input() { cout<<"Enter the limit upto which you want to enter "; cin>>n; cout<<"Enter the numbers "; for(int i=0;i<n;i++) { cin>>a[i]; } cout<<"\n enter the string"; cin>>b; } void large() { int c; c=a[0]; for(int i=1;i<n;i++) { … | |
Hello everyone, I want to implement Kruskal algorithm for finding minimum spanning tree in Adjacency Matrix for my program. So I want to write method Graph& getMinSpanningTree() . I have 2 classes: class Graph { public: /* Adds an edge between given vertices. Third argument is a weight of an … | |
I understand how to write a function to loop through a vector<double> and calculate the mean and standard deviation of its values, but I was wondering if there is a library which I could simply #include<> and then just call a function to compute such values. | |
So i am doing a program that opens a file that contains grades and shows the average, total, etc.. But at the end I am supposed to make a histogram that would look something like this A= * * B= * * * C= * * * * * * … | |
Hello New here I am looking for some information on Splay Trees. I can't find any c++ source code on splay trees. any idea on where to look | |
Improper use of typedef 'TManagerProc' struct TManagerData { public: // Card is inserted callback procedure TManagerProc CardInserted; // Card was activated callback procedure TManagerProc CardActive; // Card was removed from the reader callback procedure TManagerProc CardRemoved; // Invalid card was inserted into the reader callback procedure TManagerProc CardInvalid; // There … | |
I have been working on a program for class- yes this is homework. I have completed the program, it runs- yay newbie me- but it does not run correctly. I am working with functions, wether referenced or not, and I have passed several values to a function inorder to calculate … | |
Hello everyone. As the title suggests i need to implement a type of timer based function inside a UI Thread in MFC. Although CWinThread is a UI Thread and has a message pump it does not have a Timer function as CWnd::OnTimer Is there any way i can implement a … | |
Hello, So basically, I am trying to create a system based on the Singleton Pattern and I'm confused. If I have an Animal class, as well as a Cat class which is derived from Animal and then using a Singleton class will create a single object of which-ever class has … | |
case 4: { cout<<"Enter the word you want to delete: "; gets(b); f1.open("anotherf.txt",ios::in); f2.open("tempf.txt",ios::out); while(!f1.eof()) { f1>>a; i++; if(strcmp(a,b)==0) { j=i; } } i=0; while(!f1.eof()) { if(i!=j) { f1>>a; f2<<a; } i++; } f1.close(); f2.close(); f2.open("tempf.txt",ios::in); f2.seekg(0); f1.open("anotherf.txt",ios::out); while(!f2.eof()) { f2>>a; f1<<a; } goto menu; } I am trying to … | |
i have to write a code that should count spaces. i am writting in this way but its not working. if (input==' ') space++; | |
How do i alter an element in the set for example how do i edit the 'm_a' member variable of a element in my set? class CPerson { public: int m_a; CPerson(int _a) { m_a = _a; } } set<CPerson*> myPersonSet; .. ... set<CPerson*>::iterator it = myPersonSet.find( CPerson(20) ); // … | |
Hi I've tried the code below to merge 2 linked list which f1 and f2 are the first nodes in the initial lists and the "first" is the first node in the result list. But it doesn't work! [CODE] node *merge(node *first,node *f1, node *f2,int n1,int n2){ int n=n1+n2; while(n-- … | |
I don't know jack about Visual Studio, and I'd like to keep it that way because I like doing stuff on the command line, I have my preferences. But my teacher uses it to compile and I'm curious what I did wrong because gcc didn't throw anything. So, code (Without … | |
Hi so I have a practice lab I am working on where I am asked to fill in the code. The program is supposed to take in two 3D points (x,y,z) and compute the distance between them. I have almosty all of the program finished im just stuck on how … |
The End.