49,761 Topics
| |
Howdy, I have been trying to teach myself C++ for a few months now and have been progressing nicely thanks to all the wonderful help I have received on this site and others. Thanks for your help! Now, on to my question. I am currently trying to learn linked lists. … | |
Hi all I am fairly new to C++, and am having problems creating a quick GUI application using the Win32 API. I'd like to use the "windows form project" option in Visual C++ ...which creates windows, textboxes, buttons etc. through a drag & drop interface. The problem is that I … | |
I have the code written, compiling and no errors, I just need it to write to a file now. This is the code I have. Is the header piece correct? [code] #include <iostream> #include <string> #include <fstream> #include <cstdlib> using std::ofstream; using namespace std; class finalgrade { char firstName[20]; //to … | |
so im new to templates and i dont understand the errors im gettin in my code. the errors start where it says "sort double array" in the main and the errors are the same for all 6 function calls after that "cannot convert parameter 1 from double[10] to int []" … | |
Hello, I've got a 2 diemsional array that ments to represent this: Name Address A 1 B 2 C 3 I've got the following code written for this: [code] char * tableArray[10]; [/code] should that be: [code] char * tableArray[10][10];? [/code] And I've got a pointer that populates only the … | |
I need help making a program that include meter yards and feet. my c+ class is only in chapter 4 of the c++ book. function header should be void convertMeters(int meters) int main 1. ask for the number of meters 2. read in the number of meters 3. call your … | |
I can't seem to get it working properly. Here's what I have thus far. #include <string> #include <iostream> class Student_t { char firstName[20]; //to hold the first name char lastName[20]; //to hold the last name int exam1; //to hold Exam-1-Grade int exam2; //to hold Exam-2-Grade int homeworkavg; //to hold Homework-Average … | |
I need help with a program for school. I have to write a program that asks for the number of days each employee is absent, the total number of days absent for all employees combined and the average number of days absent for all employees combined. I need help before … | |
1. The temperature of a city is obtained at a weather station in degrees centigrade. The job is to convert this temperature into its corresponding value in degrees Farenhiet. Assume the data type for the value of temperature to be 'double' and use the formula F=(9/5)*C+32. What is the input … | |
hmm im trying to convert this over..so that i can right the name in the program and it finds..the address in the database....i think im on the right track just some problems...any help or tips? [CODE]#include <map> #include <string> #include <iostream> using namespace std; int main() { map<string,string> addressbook; pair<string,string> … | |
Hey guys I am just wondering why the following code gives the wrong number of characters from a file when the character count is the default? Thanks. [code] void main() { int blank_count = 0; int char_count = 0; int sentence_count = 0; char ch; ifstream iFile("c:\test.txt"); if (! iFile) … | |
I would need a quick implementation in C++ on how to trap and manipulate keyboard events probably thru keyboard hookin reply on [email]paulotara@yahoo.com[/email] :mrgreen: | |
Hello everyone, I was having this problem of sorting words of a string entered by user where the user enters many strings and words of each string are sorted separately. This had to be done using pointers . Heres my attempt.I dont know where I am going wrong as garbage … | |
hi, i wanted to knoe that how to calculate the total size of file in C? | |
Hello ladies and gents, I wanted to ask if any of you could tell me what I'm doing wrong when I want to debug any program that Ive written in VC++ 2005 Express Edition. Reason is, after I put a break point to where the program has to run and … | |
Hi everybody; I just started to learn stacks. How can I count the number of Items in a stack by using ADT stack operations?? Can u help me? | |
Can someone offer assistance in converting seconds to minutes and seconds. :?: | |
Hi, These are some of the few questions for which i couldn't find answers. :lol: . I was just hoping if any of you can help me out. 1.Write a "Hello World" program in 'C' without using a semicolon. 2.Write a C++ program without using any loop (if, for, while … | |
I am trying to do a priority queue with a custom type, but I keep getting this error des.cpp:77: error: expected init-declarator before "eventQ" des.cpp:77: error: expected `;' before "eventQ" This happens in the following code [CODE] Program: This is a discrete event simulator designed to aid in the analysis … | |
Hello ladies and gents, Ive been trying to find a solution for this exercise wich goes as follows: Rewrite the Student_info structure, and the 'read' and 'grade' functions, so that they calculate each student's grades as part of reading the input, and store only the final grade. Because the exercise … | |
Hi... m a new member n just started to learn c++. so please help me out... its simple I read in 1 of the replies that #include<iostream.h> is obsolete.... n one can use #include<iostream> But wen i tried it in d program it does not included file.. expectin replies... :twisted: … | |
Is there a code to increase the console window so that the user does not have to do it manually? I am using VC++ 6.0 | |
Hey guys I was just wondering is there a c++ function that will eliminate white space from the start and end of a character array data obtained with the getline function? Thanks. | |
I am writing a program and I want a graphic to show up when the user first starts my program. I know how to implement it, the problem is that I want to show a graphic totally made up of ASCII art. The problem is that it has a lot … | |
Whilst I shouldnt have posted the entire code up, I see no other option :( [code] #include <iostream> // cout << endl ... #include <fstream> // for reading in the file ... #include <string> // for comparing strings ... using namespace std; string reserveWordTable [4]= { "if", "then" , "else", … | |
can anybody give me an idea how to sort string in alphabetical order in file.text after user input string and in the file already had a list of string? which is the best,let user input the all string first then sorting it or sorting if after user input the string? … | |
Can't figure out why I have the error...The error is: C2181: illegal else without matching if....My program is: #include <iostream> using namespace std; int main() { int x=300; //this is the room capacity int y=0; //number of people int z=0; //this is the equation answer int m=0; //this is the … | |
Hey guys, I am using the code below ot search for words in a text file and count them. I now would like to do something a little more advanced for example if a text file contains "hello my name is kim" I want to be able to increment a … | |
Hi friends!!!!!!!!!! I am taking part in Red hat competition to develop a linux project. I am not able to decide on what shd i do the project. In 1 group there r 3 ppl and we have around 8 months time, it includes 2 months vaccations also. I want … | |
I have this assignment from my book that wants me to create a class and have its member variables be dynamic. This is easy to do but I can't understand why I would want to, and don't see any advantages of having the members be dynamic. Personally I would create … |
The End.