49,761 Topics
| |
Hi C++ experts , actually my knowledge is not very good I can call my self degree 2 beginner , But I know how to do things in C#, and write now I need to execute what I have already done in C#, in a c++ code. MORE EXPLANATION : … | |
hi friends, can posible to connect ms-access or sql database with c++ ? if posible tell the tips to do it...... | |
Can anyone explain how bubble sort work or give an example or a simple code that is bubble sorting Thanx in advance | |
this is the sample program of selection sort, which is given the value. But, how to call the value from read file? anybody knows? [ICODE] #include <iostream> using namespace std; void selectionSort(int *y,int n)//selection sort function { int i,j,min,minat; for(i=0;i<n;i++) { minat=i; min=y[i]; for(j=i+1;j<(n);j++) //select the min of the rest … | |
Here I am going to explain how to make a class so that user can create object of it on free List( heap memory) or Stack. Example 1: Object should be created Only On Heap memory.Idea is that make constructor as private so that no one create on stack. But … | |
Given the declarations: int n; char ch1; char ch2; and given that n contains a two-digit number, translate n into two single characters such that ch1 holds the higher-order digit, and ch2 holds the lower-order digit. For example, if n=59, ch1 would equal '5', and ch2 would equal '9'. Then … | |
I have a feeling this question might be a no brainer to all you. But is it possible to convert a string object to an istream obj. Because what I need to do is read the string expression and then calculate it using the "read_and_evaluate(istream&)" method in my if else … | |
[code]#include <iostream.h> #include <string.h> #include <vector.h> #include <fstream.h> using std::string; using std::vector; void function(vector<string>&fn,vector<string>&fnum,vector<string>&ln,vector<string>&lnum); void main() { ifstream fin,f2,f3,f4; //First name input vector <string> fname(25); fin.open("firstname.dat", ios :: in); for( int i= 0;i<25;i++) fin>>fname[i]; fin.close(); //Second name input vector <string> fnum(25); f2.open("firstnum.dat", ios :: in); for(int i= 0;i<25;i++) f2>>fnum[i]; f2.close(); … | |
I have this code that opens a Form. This code does work but if I just close the Form that did open with this code and press the button5 again, I will have an Errormessage: [B]"Cannot access a disposed object. Object name: ´Form2´."[/B] But if I change: this->form2instance.Show(); to: this->form2instance.ShowDialog(); … | |
I have a Form witch scrollbars that is called Form2. Is there any way to programatically go to the top of the Form without having to scrollup with the mouse ? So if you have scrolled down to the end of the form. Is it possible to press a button … | |
Hi guys, I was wondering if I could get some help on the topic of recurrsion. A week ago i was told to create a application using nodes. this week I need to convert the reverse_list fuction I made below into using recursion. any help would be great thanks. not … | |
Is there any difference between regular expressions in C++ and in PHP/Perl? Or can one use the same regular expressions in C++ as in PHP? | |
I haven't been on the forums for over like 20 days because I have been busy with things, and then my internet died. Not that anyone cared, but I'm just saying this so Vmane won't think that I just copied his code solution and ran away if he stumbled upon … | |
Hello Everyone, I'm new to the forum, currentely I'm taking the basic C++ class and struggle through, it has been over 20 years since write any codes. I have some trouble with the code below, it work fine if I don't bother to check for leap year, but the assignmnet … | |
I write an application by C++ language and I used CGI to make the Interaction by a web page so I found problem that every once I use The web page that I created by C++, C++ application program run from it's First point so I want a solution for … | |
[CODE=C++]struct gydytojas { int gydid, amzius, specialyb, telefonas, asmkod; String vardas; String pavarde; String adresas; friend ostream& operator<<(ostream& os, const gydytojas& obj) { os << obj.vardas.c_str() << obj.pavarde.c_str() << obj.adresas.c_str() << obj.gydid << obj.amzius << obj.specialyb << obj.telefonas << obj.asmkod; // Print the members to os like you would to … | |
I am running this loop where I am substr a vector like below and then ´creating´ a new string "NewData" that I will pushback in a new vector. The thing is that I got an Error message when running this code but if I instead change these 3 lines to … | |
i want to convert stringstream into a string type e.g. [code] void countParameters(stringstream p_InputDataToCount, unsigned int &counter, char Delimeter) { size_t found; //stringstream convert ( p_InputDataToCount ); //convert>> std::hex >> m_nCommandID; //I want to do somethong like this found=[COLOR="Red"]p_InputDataToCount[/COLOR].find_first_of(Delimeter); while (found!=string::npos) { counter++; found=[COLOR="red"]p_InputDataToCount.[/COLOR]find_first_of(',',found+1); } }[/code] | |
This is mildly aggravating, but my flex and bison generated files won't compile under Visual Studio C++ 2008. It has to do with some of the structures (yyval for starters) and some apparently loose characters in the files. I'll post the compiler output, but this is my third day of … | |
I am trying to read from a serial port using System::IO:: Ports in visual studio 2005. I can write fine, but reading isnt reading in anything to the buffer. I am using the following code, similar to the way i was writing to the port. [CODE]array<unsigned char>^ messageBuf = gcnew … | |
i m getting this error. but i couldnt identified where i have gone wrong. could someone explained, normally in which situations this type of error occurs. Error 1 error C2248: 'std::basic_ios<_Elem,_Traits>::basic_ios' : cannot access private member declared in class 'std::basic_ios<_Elem,_Traits>' c:\program files\microsoft visual studio 8\vc\include\sstream 513 | |
how do you find the smallest and largest number of 3 numbers without using logical operators and else statement only if and relational operator ? is there any other way without checking every variable against each other using if statements ? | |
I have tried eveything to count the reccurrence of just the word hello. I open a file and can count the words in the textbox but can't count just the on word that i want. Please help with this problem. thanks | |
Euhmm Ok i got some error that tells me that i can't open the program because there some error in my syntax but I really don't know where is the problem it self. #include <iostream> #include <iomanip> #include <cmath> #include <fstream> using namespace std; void voircatalogue(fstream&); void ajoutitem(fstream&); void ajoutclients(fstream&); … | |
In windows getline(,,) returns *this. And Errors are signaled by modifying the internal state flags e.g. eofbit, failbit, badbit. e.g. No characters were extracted -> then state flag = failbit I want to do erro handling to this. since this retuens pointer how can i do this. Can some one … | |
ok in what way do you separate the digits from a given int ?? like if the int is 987987 how do you separate them in to 9 8 7 9 8 7 ??? is there any function to do this ? | |
[code] void firstClass(int f); void businessClass(int b); void coachClass(char typeTicket); int main() { char type; cout<<"Please enter your which class you want to fly. (f=firstClass, b=businessClass, c=coach)"; cin>>type; cout<<endl; //bad data check while (type != 'f' && type != 'F' && type != 'b' && type != 'B'&& type != … | |
mybe i should ask my question in another way. question: we want to make a text editing program, first of all how we can make a space for user to write in it(make an arry with a lot of space exp:char txt[1000]; ?!!!) secend ,this program suppose to do flowing … | |
I write an application by C++ language and I used CGI to make the Interaction by a web page so I found problem that every once I use The web page that I created by C++, C++ application program run from it's First point so I want a solution for … | |
I am stuck on something that I know is so simple that I can't figure it out... I have a BST class, and a private item: [code]Node<K> *root; // root pointer //and in a seperate class I have... template <typename K> class Node { public: // constructors Node() {}; Node(const … |
The End.