49,761 Topics

Member Avatar for
Member Avatar for ninreznorgirl2

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

Member Avatar for Lerner
0
208
Member Avatar for gcardonav

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

Member Avatar for seraph03
0
2K
Member Avatar for Duncans Ghola

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 …

Member Avatar for Grn Xtrm
1
249
Member Avatar for tomtetlaw

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]

Member Avatar for sfuo
0
99
Member Avatar for dangutdavid

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

Member Avatar for csurfer
-2
91
Member Avatar for ge6a93

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.

Member Avatar for vmanes
-1
120
Member Avatar for fza.h

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

Member Avatar for kekz0r
-1
102
Member Avatar for fza.h

#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(); }

Member Avatar for csurfer
0
53
Member Avatar for klackey19

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 …

Member Avatar for klackey19
0
875
Member Avatar for killerqb

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

Member Avatar for mrnutty
0
142
Member Avatar for osgiedeprof

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 …

Member Avatar for mrnutty
-1
84
Member Avatar for francis77

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 ?

0
53
Member Avatar for kustrle

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 …

Member Avatar for kustrle
0
125
Member Avatar for grando

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

0
42
Member Avatar for Phil++

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 …

Member Avatar for VernonDozier
0
106
Member Avatar for ging ging

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 …

0
76
Member Avatar for mayanktalwar

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

Member Avatar for mayanktalwar
0
108
Member Avatar for CDWITH
Member Avatar for merse
-1
43
Member Avatar for sebassn

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

Member Avatar for VernonDozier
0
116
Member Avatar for Darth Vader

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# ?

Member Avatar for ddanbe
0
71
Member Avatar for ateeqbkr

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

Member Avatar for Ancient Dragon
-2
50
Member Avatar for ilovejeju
Member Avatar for bliya123
Member Avatar for bliya123
-2
99
Member Avatar for brown_iris

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 …

Member Avatar for csurfer
0
86
Member Avatar for Darth Vader

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

0
74
Member Avatar for killerqb

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

Member Avatar for StuXYZ
0
140
Member Avatar for grando

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 …

Member Avatar for grando
0
129
Member Avatar for sumantbang
Member Avatar for Phil++
-1
52
Member Avatar for syedsalmanali

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 …

Member Avatar for mrnutty
-2
112
Member Avatar for ross42111

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

Member Avatar for WaltP
0
106

The End.