49,761 Topics

Member Avatar for
Member Avatar for tiney83

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 …

Member Avatar for tiney83
0
136
Member Avatar for Jennifer84

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^ …

Member Avatar for Jennifer84
0
141
Member Avatar for omarelmasry

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 …

Member Avatar for omarelmasry
0
142
Member Avatar for manzoor

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 ?

Member Avatar for Sky Diploma
0
841
Member Avatar for GigaCorp

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

Member Avatar for GigaCorp
0
154
Member Avatar for Jennifer84

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, ',') ) { …

Member Avatar for Jennifer84
0
270
Member Avatar for gil_mo

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 …

Member Avatar for gil_mo
0
157
Member Avatar for xlx16

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

Member Avatar for Nick Evan
0
123
Member Avatar for tondeuse34

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 …

Member Avatar for William Hemsworth
0
9K
Member Avatar for c++ newbie
Member Avatar for xlx16

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 …

Member Avatar for Ancient Dragon
0
227
Member Avatar for EBC

Could anybody advise me where I can get free resources in c++ class design, whether it's online books or websites? Thanks a lot.

Member Avatar for hatemstar
0
43
Member Avatar for tekivia80

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 …

Member Avatar for Ancient Dragon
0
127
Member Avatar for c++ newbie

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 …

Member Avatar for Ancient Dragon
0
157
Member Avatar for c++ newbie

[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]

Member Avatar for Ancient Dragon
0
48
Member Avatar for henpecked1

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 …

Member Avatar for dougy83
0
119
Member Avatar for compumasta

[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 …

Member Avatar for compumasta
0
925
Member Avatar for Jennifer84

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 …

Member Avatar for Jennifer84
0
172
Member Avatar for Seamus McCarthy

[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 …

Member Avatar for compumasta
0
96
Member Avatar for Jennifer84

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 …

Member Avatar for William Hemsworth
0
95
Member Avatar for n1337

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++ …

Member Avatar for n1337
0
308
Member Avatar for fox51

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 …

Member Avatar for fox51
0
163
Member Avatar for msk88

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

Member Avatar for Ancient Dragon
0
109
Member Avatar for Jennifer84

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 …

Member Avatar for Jennifer84
0
109
Member Avatar for tigger0484

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, …

Member Avatar for Ancient Dragon
0
107
Member Avatar for latour1972

[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]

Member Avatar for henpecked1
0
134
Member Avatar for wellibedamned

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 …

Member Avatar for wellibedamned
0
139
Member Avatar for Jennifer84

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 …

Member Avatar for Jennifer84
0
142
Member Avatar for manzoor

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

Member Avatar for Radical Edward
0
94
Member Avatar for Vipuljain

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 …

Member Avatar for Salem
0
32

The End.