49,761 Topics
| |
Hi, My assignment is to read in data from a file(first name, last name, and grade) and then output it. i have my code and i beleive the problem lies within the function readData, but i cant figure out what it is. I run the program and i get an … | |
I am using saveFileDialog1 and are trying to recognice what path that was selected when "Save" the file. I have begun some code below but are not sure what and if I will write something after saveFileDialog1-> ? [code] //Get The Path that was selected when saving the file String^ … | |
HI .... I am a beginner programmer and we are required at college to create a very simple game as a console application :( We found a graphics library for that... thank God.... But we need a sound and video library... but please consider that it should be: 1. For … | |
What are some limitations imposed by a fixed array size? can you please tell me A limitation of arrays is that they have fixed lengths. what does it means ? | |
int patientstomemory(patientstruct (*patientstructpointer)[maxpatients]) { patientstruct patientstruct1[maxpatients]; patientstruct1= (*patientstructpointer); 1>c:\documents and settings\patrick\my documents\hgkbklhb\hgkbklhb\hgkbklhb.cpp(88) : error C2106: '=' : left operand must be l-value whats wrong? very important, working on semester project due monday | |
If I am reading a .txt file with ifstream, what is the syntax to recognice if I have reached the end of file. From what I have heard somewhere before, I think it has with eof to do ? [code] ifstream File("C:\\File1\\"); std::string Line; while( getline(File, Line, ',') ) { … | |
Hi, (using MS VS2005) Recently I've found that in order for a function to be exported, dllexport *must* be placed in the same file of the function body. E.g. see the following case: [U]File a.cpp[/U] [code=C++] void dllexport a(); a(); [/code] [U]File b.cpp[/U] [code=C++] void a() { // function body … | |
answer the txt question but please don`t use using namespace std; and stuff like that because i think my compiler dosent work with new standards | |
Hey guys, i have done C++ before but gave up on it :P. But i've came back to it and i'm wondering what is a good way to simulate a left and right click? i guess you would start with this: [CODE]#include <iostream> #include <windows.h> using namespace std; int main … | |
how does the code thing work in order to put up a program? | |
can u help me with this: write a program that u can write in it and evrey time u press (F1) program will tell u number of capital letters in txt if u press (F2) it tells u number of words(for exampel: 23 erf 3e has 3 words) if u … | |
Could anybody advise me where I can get free resources in c++ class design, whether it's online books or websites? Thanks a lot. | |
I NEED HELP WITH A BIRTHDAY PROFILE IN C++ I have to create three classes: Person,birthdate, and date. Create seperate .h and .cpp files to seperate the implementation from the interfaces. 2. Create a list of attributes and operations for all the classes. 3. Implement the methods,attributes, and constructor for … | |
this is what my program looks like but after prompting and reading my files, i get an infinite loop. the program compiles and i just put that simple cout statement just to see if anything will come out. can anyone see where i am messing up within my main that … | |
[code] #include <iostream> #include <fstream> #include <cstring> #include <cctype> #include <iomanip> using namespace std; const int MAX = 30; const int MAX_HW = 10; const int MAX_E = 3; [/code] | |
I'm having a little problem with a conversion error during compile. Here is the code: [code] #include <iostream> using namespace std; class costOfItem { public: costOfItem(float i_cost); void printMe(); private: const float price; }; // Free functions void displayPrice(costOfItem z) { z.printMe(); } void displayRefPrice(costOfItem &z) { z.printMe(); } void … | |
[code=c++] struct if1 { string idnum;//id number for the student string lastname;//last name of student string firstname;//first name of student int examscore[maxexam];//array of all the exam scores of the student int hwscore[maxhw];//array of all the home work scores of the student }; void alphasort(if1 student[], int n) //the alphasort function … | |
I am trying to check the size of a file with this code. The file is named "OneFile.txt" and is of the size 230 kb. The MessageBox will show the number 37. If I change the file so it will be 460 kb instead, still the messageBox will show the … | |
[code] #include <iostream> #include <fstream> #include <string> using namespace std; void writeArray(); void readArray(); const int capacity = 4; //const int spec = 4; double numbers[]={12456.89,234.00,3456.78,21212.50}; //string A12345; //string A45678; //string B21223; //string B21435; string names[]={"A12345","A45678","B21223","B21435"}; int main() { writeArray(); readArray(); } void readArray() { ifstream infile; infile.open ("accounts.txt"); infile … | |
I have a form (Form2) that I want to write text at the top of (In the blue field where you normally can can tell what the windows/forms name is) I thought it should be like this but I cant find "Form2" after this-> What I can find is Form2_Load … | |
Hey all, I have recently become interested in trying to automate various MS Office applications using C++... I was writing some macros in Excel to update some databases that I work with, and decided it would be cool if I could sort of wrap the entire process in a C++ … | |
hey there i have a question for you guys. my program reads a file and then save each line of the file into a multimap<string,int> containing the string and the number line. i have the convert strings in alphabetical order, like take into aetk, and thats where the problem begins … | |
How can i add a short cut to my application in the Menu which we get on Right Clicking a file ? & How to pass the File name has an Argument to my application.. Platform:Windows | |
I have a dataGridView1. In a datagrid you can manually write columnheader names. (Each Column can have a name) What I wonder is how it is possible to programatically write a name for example column Numer 1 ? I have looked at the memeber of the class but cant really … | |
the problem lies when the move checks to make sure it is valid, every move will display valid or not valid, and the code always displays not valid everytime [code=cplusplus] #include <iostream> #include <fstream> using namespace std; int initialmenu(); void initialboard(char board[][8]); int moveoptions();//function prototypes void appropriatemove(char board[][8], int move, … | |
[code=cplusplus] #include #include int gcd (int , int ); void main () { int m, n; cout<<" Enter first integer:"; cin >>m>>endl; cout<<" Enter second integer:"; cin >>n>>endl; cout<<m<<"&"<<n<<" The GCD is:"<<gcd(m,n)<<endl; } int gcd (int x, int y) { if(y==0) return x; else return gcd(y,x%y); } [/code] | |
okays... so i'm looking for some kind of a standard algorithm that doesn't take long. i thought going backwards, finding the first space, writing the last word and nulling (is that even possible?) each char, but that doesn't really sound good to me. I've seen some people say you should … | |
I have a checkedListBox1 wich consist of a many lines with text. What I am trying to do is to search trough this checkedListBox1 to see if "Hello" could be found in this box and if it is found, this Item(Line) will be selected. I am not sure what could … | |
hi can you tell me the anatomy of game in which the player picks a number and the computer must guess what it is. no code just give me a hint or two :D | |
Can Anyone suggest me some C++ coding for : I want that like in G-talk when,I click on Cross "X",it will minimize my software icon like G-talk icon. Secondly,if Like G-talk it should start blinking,when some error is reported and displaying error also. I have to do coding in C++.and … |
The End.