49,761 Topics

Member Avatar for
Member Avatar for Acidburn

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

Member Avatar for Acidburn
0
106
Member Avatar for marioxp

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 …

Member Avatar for marioxp
0
161
Member Avatar for YoTaMiX

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

Member Avatar for WolfPack
-1
146
Member Avatar for shlinky

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 …

Member Avatar for dwks
0
149
Member Avatar for nexes300

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 …

Member Avatar for nexes300
0
527
Member Avatar for kjones2k1

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 …

Member Avatar for kjones2k1
0
274
Member Avatar for Podge

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 …

Member Avatar for Lerner
0
113
Member Avatar for benyam_dessu

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

Member Avatar for iamthwee
0
84
Member Avatar for jack223

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

Member Avatar for WolfPack
0
93
Member Avatar for Kellaw

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 …

Member Avatar for web_developer
0
841
Member Avatar for benyam_dessu

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

Member Avatar for benyam_dessu
0
82
Member Avatar for DotNetUser
Member Avatar for Ancient Dragon
0
119
Member Avatar for SiliconSpec

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 …

Member Avatar for iamthwee
0
1K
Member Avatar for c++34

İ 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.

Member Avatar for c++34
0
129
Member Avatar for jack223

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

Member Avatar for jack223
0
181
Member Avatar for Tiffiney_v24

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

Member Avatar for iamthwee
0
157
Member Avatar for Lothia

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 …

Member Avatar for WolfPack
0
205
Member Avatar for francis adepoju

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 …

Member Avatar for francis adepoju
0
93
Member Avatar for francis adepoju

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 …

Member Avatar for Narue
0
85
Member Avatar for DotNetUser

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

0
54
Member Avatar for Kiba Ookami

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

Member Avatar for iamthwee
0
192
Member Avatar for dors_zone

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 …

Member Avatar for Lerner
0
154
Member Avatar for dors_zone

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 …

Member Avatar for Lerner
0
121
Member Avatar for vamsi.rgiit

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 …

Member Avatar for Lerner
0
58
Member Avatar for babyjoan

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

Member Avatar for Ancient Dragon
0
110
Member Avatar for MAGiC333X

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 …

Member Avatar for MAGiC333X
0
124
Member Avatar for Sun

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

Member Avatar for Narue
0
90
Member Avatar for Layla_2401

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 …

Member Avatar for Narue
0
183
Member Avatar for amen

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 …

Member Avatar for Narue
0
147
Member Avatar for marioxp

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 …

Member Avatar for Narue
0
172

The End.