49,761 Topics
| |
[CODE]class MyFloat { private: enum {MAX_DIGITS = 20}; char Number[MAX_DIGITS + 1]; char NumberOfDigits; public: void Write(); friend void AssignValue(MyFloat& X); }; void MyFloat::Write( ) { int i; if(!NumberOfDigits == 0) { cout << "0."; for(i=0; i<NumberOfDigits + 1; i++) cout << int (Number[i]); } else cout << "0.?"; }[/CODE] … | |
Hello guys You rookie here. been trying to run a code but I am getting this weird error that I have not seen before. I have attached a copy of the error and the part of the code it refers to. Thanks for your help GCard 1>------ Build started: Project: … | |
This program is intended to determine if a fractions is valid (non-zero, non-negative denominator) and to convert an improper fraction into a whole/mixed number. While running the program I get the message "Floating point exception" after it reads the inputs just inside the for loop. Any insight into what is … | |
Is there any functions that split a string? Such as this: [code=c++] string s1 = "lol-lol2-lol3"; string s2[3]; char spliter_char = '-'; split_strings(s1, s2, spliter_char); //s2 should now be: //{"lol","lol2","lol3"} [/code] | |
#include <iostream> #include <string> Void main() { int p; A=0; int j; int R; int D; cout<<"enter cost of stereo purchase \n""; cin>>P; cout<<"enter Rate of interest per month \n "; Cin>>R; cout<<"enter period or Time \n"; cin>>T; cout<<"enter monthly payment\n"; cin>>D; do { I=(P*R*T)/100; A=I; A=A+I; M=P-I; P=P-M; j=j+1 … | |
Hello, i have a problem which is displaying a bitmap into Visual C++ 6.0 SDI Application. I need a function that does displays it and i hope that someone can direct me how to do it. Thanks in advance. | |
#include <iostream.h> #include <conio.h> void main() { clrscr(); int high=0; int low=0; int number; cout<<"Enter in the number"<<endl; cin>>number; high=number; low=number; for (int count=0;count<4;count++) { cout<<"Enter in the number"<<endl; cin>>number; if(number>high) high=number; if(number<low) low=number; } cout<<"\nThe highest number is:"<<high; cout<<"\nThe lowest number is:"<<low; getch(); } i cant understand this code … | |
#include <iostream.h> #include <conio.h> void main() { clrscr(); int high=0; int low=0; int number; cout<<"Enter in the number"<<endl; cin>>number; high=number; low=number; for (int count=0;count<4;count++) { cout<<"Enter in the number"<<endl; cin>>number; if(number>high) high=number; if(number<low) low=number; } cout<<"\nThe highest number is:"<<high; cout<<"\nThe lowest number is:"<<low; getch(); } | |
hi everyone, I'm working on a project for one of my classes that parses a given grammar. I'm pretty sure I have coded it correctly but I keep getting the following list of linker errors: [Linker error] undefined reference to `assign(char)' [Linker error] undefined reference to `integer(char)' [Linker error] undefined … | |
When I declare a new Hashtable such as: String a = null; HashTable<string> = new HashTable(a, 100); It tells me HashTable is not a type. [CODE]#ifndef HASHTABLE_H #define HASHTABLE_H #include <iostream> #include <vector> #include <list> using namespace std; template <typename HashedObj> class HashTable { public: explicit HashTable( const HashedObj & … | |
can someone help me out with this: i've got a little snippet that supposedly should use vectors to read values from user, then display the data in assending and descending order in which they were entered, thereafter it should display the even and odd numbers among the date entered. i've … | |
I use MySQL and Turbo C++. I can connect correctly to the server but when I try requests on the server (like INSERT INTO or DROP TABLE), it does not work although it returns that the command executed correctly. Does anyone have an idea why this may happen ? | |
Hello again everyone! Today I has a little bit complicated thing to do. I am trying to make a program which install few other programs. I have already composed 2 Window Forms Applications (see picture links below) Step 2: [url]http://www.daniweb.com/forums/attachment.php?attachmentid=12171&stc=1&d=1255853689[/url] Step 3: [url]http://www.daniweb.com/forums/attachment.php?attachmentid=12172&stc=1&d=1255853717[/url] As you can see on picture of … | |
hi guys again! i want to read a bitmap in this way: please help me!! how can i read the pixels of a bitmap?? #include <iostream> #include <fstream> #include <conio.h> using namespace std; struct bitmap{ int pixel; int black; int white; }; int main(){ bitmap b[400]; ifstream a("a.bmp",ios::binary); int i=0; … | |
Ok, so I'm working on my school project and I have a class that stores the Customers information, in the main file it then asks for the customers ID number and then checks to see if the value is true or false from the criteria entered. However, it is just … | |
Heres an AVL TREE.... and my problem is.... help me include a function that delete nodes....... [CODE] # include<malloc.h> #include<stdio.h> # include<iostream.h> #include<stdlib.h> #include<conio.h> # define F 0 # define T 1 struct NODE { int Info; int Flag; struct NODE *Left_Child; struct NODE *Right_Child; }; struct NODE *Binary_Tree (int … | |
[CODE]#include<iostream.h> #include<conio.h> void main() { clrscr(); long j,x; long k=1; long y=0; cin>>x; for(;k!=x+1;) { for(;k%5==0;) y++; k++; } cout<<y; getch(); } [/CODE] in above code i am trying to find the total no of zeroes at the and of factorial of no..........in doing this i am finding out total … | |
How to write a programmes to determine the inverse of a given matrix? | |
[B]Hey guys, if someone can help me on this one, I'd be thankful. The thing is that this is a sample work. I gotta do the same thing but with 4 variables, organize them according to the correct order, from lowest to greatest or viceversa, it doesn't matter. And I … | |
Now I use a C++ code where I save a color like this: [code] public: System::Drawing::Color ColorSaved1; ColorSaved1 = textBox1->BackColor; [/code] I wonder how I can convert this to C# ? | |
Design a class hierarchy for the players in which you are required to find out the best player in each category according to their performance in a tournament | |
In this lab we look at molecular formulae written out as follows: H | |
this program imitates the capabilities and function of a 4GB(4096mb) flash disk. It must contain the ff.functions and declerations. void Format(void); int Copy(int size); int Delete(int size); int freeMem = 4096; *freeMem - holds the remaining space of the flash disk,initialize to 4096. Format() - erase all contents of the … | |
[B][/B]I have a native code that I am trying to convert to managed code. I have a vector where I use a comparer to sort it in this code: [code] struct Sorting1 { bool operator () ( const std::string& a, const std::string& b ) { std::stringstream as( a ); std::stringstream … | |
My compiler is throwing me this error when I try to make a new one. I am trying to make it with this [CODE]string a = "five"; HashTable<string> *hashy = new HashTable<string>(a,100);[/CODE] This is the compiler error (.text+0x1d3): undefined reference to `HashTable<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >::HashTable(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, … | |
hi guys! i want to read a black & white bitmap with c++ and show it as 0 & 1 in console! do you know how can i do that? bye the way i want to build a simulated robot that follow a black line that had been drawn in … | |
how to create a program in c++ to calculte body mass index of a person? | |
| Q#1: Write a program that recognized whether input character is an uppercase, a digit and special character. Q#2: Write a program that takes an integer number up till 5 digits and then calculate the sum of integer numbers. For example: 1234, its output will be: 10. Q#3: Write a program … |
[QUOTE]Been all through books and tutorials trying to learn how to code the while loop, char, switch and bool. in one program Loop is stuck. If wrong letter is entered, should ask user to reprompt, otherwise the function returns the number, but will not leave the loop. The problem may … |
The End.