49,761 Topics
| |
Hello folks my fstream system appears to have failed! it all worked until i split the file up into *.H and *.CPP. // header file [code] #include <string> #include <fstream> #ifndef SCANNER_H #define SCANNER_H void openfile(void); bool check(string token); bool testing(char sym); string getsym(void); #endif [/code] the .cpp file: [code] … | |
My problem is that I have to pass two dimensional array into member function and fill it. I've tried solve it on few ways but only success is without class in main fuction create object and fill array in that object, but that isn't what I need. I've read in … | |
Hello :-) I have installed Fedora Core 4 and we learn in college C++ . where can i find a C++ author and compiler for Fedora Core 4? Thank you | |
Hi! I have a class called anItem which is defined something like this : [CODE] class anItem { CString string1; CString string2; long bla1; long bla2; }[/CODE] ok should be enough. Constructor/Destructor are empty. At another place I use this class as a template for a std::list. [CODE]std::list<anItem> list;[/CODE] I … | |
I can't seem to make the map template work for me. [CODE]//#include "PrecedenceXY.h" #include <map> #include <string> using namespace std; map<string, int> normalXPrecedence; map<string, int> normalYPrecedence; normalXPrecedence["x"] = 1; normalXPrecedence["x^2"] = 2; normalXPrecedence["x^3"] = 3; normalXPrecedence["x^4"] = 4; normalXPrecedence["x^5"] = 5; normalXPrecedence["x^6"] = 6; ect, filling up both X and … | |
Hello, I am in an entry level C++ course. We have a homework problem that requires us to prompt the user to enter five sets of three numbers (type double) and store the numbers in a 5 x 3 array called `Data[5][3]`. Then, pass the matrix `Data[5 ][3 ]` from … | |
VC++ 8 I have created a form class with a combo box. I want to populate the combo box with data calculated from the form. This I can do. But I want to tie the string data in the combo box to numeric (double) value. Select the string and get … | |
Dear Colleague, I have some experience with turbo c++, but now I have an assignment to be done using Dev C++. Is there anyone who can give me an idea about this Dev C++. It Good if it is supported with some sample program that use some classes and files. … | |
What is the O-notation for the following code? [code] cin >> N; for (int count = 1; count <= N; count++) { for (int count2 = 1; count2 <= count; count2++) } [/code] a) O (log N) b) O (N) c) O (N^2) d) O (N^3) outer loop is O(N) … | |
How do you implement a binary number to convert into an equivalent decimal number using stack in C++.I am having a headache here.I have been thinking the past 2 days but without much knowledge in C++ i am partially dead. Tried reading books but still can't figure it out and … | |
Dear Colleague, I have some experience with turbo c++, but now I have an assignment to be done using Dev C++. Is there anyone who can give me an idea about this Dev C++. It is Good if it is supported with some sample program that use classes and files. … | |
How do you declare an array of records in MC++? And have a ptr point to it? Thanks. | |
Hey all. Im currently studying C++ and im having a little bit of trouble figuring out how to count spaces in a string. The program is to enter a full name with any amount of names and print the initials of the first name and print the last name. Im … | |
İ dont know anything about file IO.if you have any idea how can write a c++ program to my hw pls share your ideas.homework is in the attchement. | |
I have no clue what the answer is. Which of the following dynamically allocates an object of type ourClass? a) ourClass ourPtr; ourPtr = new ourClass; b) ourClass ourClassObj = new ourClass; c) typedef ourClass* ourClassPtrType; ourClassPtrType ourClassPtr; ourClassPtr = new ourClassPtrType; d) typedef ourClass* ourClassPtrType; ourClassPtrType ourClassPtr; ourClassPtr = … | |
[COLOR=DarkRed]Write an interactive C++ program that prompts the user for ten (10) real numbers and calculate the sum, average, and prints the result. Hint: you may use an array to store the data. Program requirements: - The program must contain a class in which all the required private and public … | |
This is not my code, I have gotten it from a book and am trying to figure out how to get it to run. It has 5 sections (or 6) and I either get some error with external _main or unexpected end. Here are the pieces [code] //--------------------------------- // Blizzard … | |
I'm not a C++ programmer in the real sense of it, but my project involves gathering some data, store the data in memory with time stamp and later upload to the PC where a C++ algorithm will be used to manipulate it and then produce a graph of the manipulated … | |
Thanks for your earlier comments. Answers to some of your queries are as follows: The way my design is at the moment, my inputs are mVolts data going into the ADC at a regular interval. I hope to store the HEX outputs from the ADC into RAM or a data … | |
When I create a windows form application in VC++.NET, the code below is autogenerated to launch Form1. I want 2 instance of Form1 to run concurrently. I added another `Application::Run(new Form1());`. But, it didn't do what I wanted. After Form1 closes, the 2nd instance of Form1 is launched to run. … | |
[CODE]//Factoral Thing I made myself #include <iostream> using namespace std; int main () { cout << "*********************"<<endl; cout << "*Michael F Eversberg*"<<endl; cout << "* Factoral Solver *"<<endl; cout << "*********************"<<endl; int x, y; cout << "Please Enter a whole Number: "; cin >> x; y = x; for (x … | |
Question: Explain what the following program does. #include <iostream> using namespace std; int whatIsThis( int [], int); int main() { const int arraySize = 10; int a[arraySize] = {1,2,3,4,5,6,7,8,9,10}; int result = whatIsThis(a, arraySize); cout << “Result is “ << result << endl; return 0; } //what does this function … | |
here are the question, a) Write a function named OutOfOrder that takes as input parameters an array of doubles named Arr and an int parameter named size and returns a value of type int. The return value is -1 if the array is in order, meaning that the first element … | |
help me with this code please.this code is for selection sort using linked list.please check it and give me suggestion. [code] #include<iostream.h> #include<conio.h> void main() { struct mylist{ mylist * nxt; int val; }; int a,b,c,d=1,i,j;mylist * t; clrscr(); cout<<"Enter the no&the total no of numbers"; cin>>a>>b; mylist * head=new … | |
I am to write a program which will prompt the user for a size (NxN) matrix then 1. call a function (generate) that generates the values of the matrix using the formula: X ij = 1.0/(I + J) 2. call a function (transpose) that finds the transpose to the matrix; … | |
Hello, I'm having a pretty weird problem with a program i created, it's going to be a RSA encrypter... I've made a BigNum class that is able to do multiplications, additions, decreament, divisions and modulo on very large numbers... The size of these numbers is defined by a contant (named … | |
[COLOR=Navy]How can i make a program in c++ which accept only the following: 1) Any positive number. 2)Character from [A to Z] -in upper case.[/COLOR] [COLOR=DarkRed]Note: this program won't work as desired because idon't know how to get the ASCII of any number or character-by using int().[/COLOR] #include<iostream.h> void main() … | |
Hello Everyone, I'm working on a couple of programs, client/server. I'm using winsock library to handle data transfer between the two programs. I'm having a problem when it comes to sending int values, they must be converted to (char *) since that's the data type of the buffers used in … | |
i input a sentence " i love eat".how can wanto to get c++ to get a full sentence.. [CODE] #include <iostream> #include <string> using namespace std; void echo(string message) { cout << message << endl; } int main() { cout << "Enter your word: "; string word; // place declaration … | |
I am new in programming and my problem is probably notorious but still is a problem. I want build class which can produce object which contain two dimensional dynamic array and member function which fill that array. Question is where I should to create the array, in function or in … |
The End.