Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
87% Quality Score
Upvotes Received
7
Posts with Upvotes
7
Upvoting Members
6
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
2 Commented Posts
~23.2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for MareoRaft

Here is a simple program which gives me unexpected results: [code=c]int main() { printf("\nTo calculate a^b, enter value a now.\n"); int a = getchar() - '0'; printf("\nEnter b now.\n"); int b = getchar() - '0'; printf("a = %d, b = %d\n\n", a, b); return 0; }[/code] if i hit a …

Member Avatar for MareoRaft
0
3K
Member Avatar for spankboy11

Hi there, I'm having trouble dealing with dynamic arrays and was wondering if someone could tell me where the problem lies. I'm new to C++. Basically, in the following code, the dynamic array of Fuzzy objects works fine. But when you uncomment out the bit that actually assigns values to …

Member Avatar for Kanoisa
0
225
Member Avatar for darkmeyi0319

hey guys i just want to ask for your help about the source code of ROCK PAPER SCISSORS game on c++, the rules of the game is that, the user and the computer will battle, the game consist of 5 rounds ONLY,and first player who score 3 out of 5 …

Member Avatar for dflatt
-2
158
Member Avatar for D_switch

problem: a list represented using cursor based implementation contains all ACT, BSCS, BSICT, BSIT and BSMATH students. A dictionary is created implemented using open hashing for BSCS and BSIT students. Each grouping the dictionary is a list implemented using cursor based. given below is the definition of the LIST, Dictionary, …

Member Avatar for Luther von Wulf
0
103
Member Avatar for jeevsmyd

I have been advised by many people that it is better to use integer return type for main function instead of void ! I actually dont understand what return 0 means .. main returns 0 value to program ! What does that mean ?! Could you please help me understand …

Member Avatar for gerard4143
0
137
Member Avatar for harikrishna439

How to delete array elements by using it's subscripts in C language?

Member Avatar for Ancient Dragon
0
173
Member Avatar for Stefano Mtangoo

Hi, Please help me spot where I go wrong. I cannot understand why the error. The Code with error and full error are below. Thanks Error:[COLOR="Red"] loaddll.cpp:6: error: invalid conversion from 'void*' to 'void (*)(wxString)'[/COLOR] lines 5, 6 and 7 [CODE=C++]typedef void (*helloSteve)(wxString);//takes string and Shows it! helloSteve myFunc = …

Member Avatar for Stefano Mtangoo
0
1K
Member Avatar for mrkaran

if i have two strings say: string str1,str2; then how can i compare them by using strcmp function?

Member Avatar for NathanOliver
0
100
Member Avatar for algoexpert

i am using window 7 .in window 7 tubo c++ does not support full screen mode .i want to use the graphics functions of turbo c.i am unable to use graphics in turbo cin window 7.so please anyone tell me the solution.

Member Avatar for Kakashi Hatake
0
137
Member Avatar for indr

the following is the code... #include<iostream> #include<iomanip> using namespace std; int main() { float start_temp,stop_temp; float step,F,C; cout<<"start temperature:"; cin>>start_temp; cout<<"stop temperature:"; cin>>stop_temp; cout<<"step temperature:"; cin>>step; float i=0; cout<<setw(10)<<"celsius"<<setw(15)<<"fahrenheit"<<endl; cout<<setw(25)<<"celsius"<<setw(15)<<"fahrenheit"<<endl; for(i=start_temp;i<=stop_temp;i=i+step) { C=(5.0/9.0)*(i-32); F=32+(9.0/5.0)*i; cout<<setprecision(2); cout.setf(ios::fixed); cout<<setw(10)<<C<<setw(10)<<i<<setw(10)<<F<<endl; } } and the output for the above code is: start temperature: 0 …

Member Avatar for Luther von Wulf
0
114
Member Avatar for jemz

hello can you help me please,my problem is that i don't know how to format numbers when the user input this 1500 it should display 1,500.00 and having total paid 3,080.00 please help me hoping for your positive responds...thank you in advance...

Member Avatar for jemz
0
102
Member Avatar for indr

hi i am trying to use setw with a string.. here is my code.. [CODE]string a="hello"; cout<<setw(10)<<a;[/CODE] i inserted string header and iomanip header files... now my output should be with a few number of blank spaces and then it should print hello.. but its not working for me... could …

Member Avatar for indr
0
435
Member Avatar for Luther von Wulf

This function reformats a numeric sequence to include grouping in the usual human readable format. "123456789" becomes "123,456,789", for example. The formatting is localized to the current running machine. In a German locale the previous example becomes "123.456.789". In a Hindi locale it becomes "12,34,56,789". Printing numbers for human consumption …

1
470
Member Avatar for ftl25

Hi. I am trying to create a look up table in C. I have attempted it, but there are compilation errors occurring. Can anyone tell me what i'm doing wrong/offer any advice? I have in my header file the following: [code] struct { (void)(*function)(); const char* functionName; } lookUpTable[] = …

Member Avatar for gerard4143
0
2K
Member Avatar for cesvokamra

Hi guys, I've to develop a software to compress and extract files using the RLE algorithm. And I've decided to implement it so that if I've a set of chars like "ABRTTTTOPSSSSSNU" it will be converted as "ABR4*TP5*SNU". Now, the problem is that for example the char '*' could be …

Member Avatar for cesvokamra
0
116
Member Avatar for xavier666

Here is a very simple code demonstrating how 'protected' is used [CODE]# include <iostream> using namespace std; class A { protected : int a; }; class B : public A { public : void f_1() // * { a = 10; cout << a; } }; int main() { B …

Member Avatar for Fbody
0
111
Member Avatar for miturian

So, due to my last question, [url]http://www.daniweb.com/forums/thread303487.html[/url], I am becoming acquainted with the vector template. However, I clearly am not using the commands correctly. Below is a section of code which, eventually, leads to a segmentation fault later in the program. First an introduction of the variables: [CODE] using namespace …

Member Avatar for arkoenig
0
172
Member Avatar for ziarczak

Hello everyone, I'm having problems with this code: [CODE=cpp] #include <vector> using namespace std; template <class Type> class Some { private: vector<Type> elements; vector<Type>::size_type index; //THIS IS WRONG public: Some() { } }; int main() { } [/CODE] It doesn't compile, giving me [CODE] p.cpp:9: error: type ‘std::vector<Type, std::allocator<_Tp1> >’ …

Member Avatar for Luther von Wulf
0
92
Member Avatar for furtaker

Hi, I am trying to incorporate a struct and class in the same program to calculate overtime pay and hours for one person. I am having a hard time with these two and especially putting them together. I am not sure what to do to get the program to compile …

Member Avatar for Luther von Wulf
0
240
Member Avatar for hanvyj

I have a problem casting a long to an int in c++ There is a long "biWidth" in the &pVideoInfoHeader->bmiHeader struct, I simply want to read this into an integer value "Width" [CODE=c]//check the video info header Width=(int)(&pVideoInfoHeader->bmiHeader.biWidth); Height=(int)(&pVideoInfoHeader->bmiHeader.biHeight); //break point here [/CODE] When I step through the code to …

Member Avatar for Stefano Mtangoo
0
5K
Member Avatar for Allophyl

I have the line [code=c++]#include <algorithm>[/code] at the top of a file, and the line [code=c++]nth_element(minRollArray,minRollArray+n,minRollArray+numSets);[/code] in one of the fuctions in that file. However, when I try to compile it I get the error error C3861: 'nth_element': identifier not found at that line. I would expect this if I …

Member Avatar for Allophyl
0
516
Member Avatar for Luther von Wulf

What are good name conventions for classes. How for example should the name be different between a base class and a derived class or an abstract class and a concrete class?

Member Avatar for mike_2000_17
0
182
Member Avatar for bmos

I was assigned to write a program that will verify a password entered by the user. The program should verify that the password has 6-10 characters and atleast 1 uppercase, 1 lowercase, and 1 numeric digit. The program runs, but will only display the length of the password entered and …

Member Avatar for Anyzen
0
6K
Member Avatar for Luther von Wulf

What are some good exercises for an experienced programmer new to C++? I have found lists and suggestions on the web, but they are always simple or I have already completed them in other programming languages like C or Basic. Something that will help with learning modern C++ is best.

Member Avatar for mrnutty
-1
2K
Member Avatar for Auraomega

Hi there, I'm in the process of moving some code into Visual C++ 2008, the code works fine when compiled with Mingw however crashes when compiled with VC++: [CODE=c++] s_cell **cell; *cell = (s_cell *) malloc(sizeof(s_cell) * MAP_X); for(int loop = 0; loop < MAP_X; loop++) { cell[loop] = (s_cell …

Member Avatar for Aranarth
0
164
Member Avatar for Nulled

I have had horrible experiences with this forum, but I'm going to give it another go. What is the point of learning C++? I am only a beginner but what is the point? You learn all of C++, then what... you can make a console program whopee! I mean, when …

Member Avatar for Yojimbo_Beta
0
224
Member Avatar for ichigo_cool

Okay. I created a program to create a character, and it uses a random number generator to initialize the Character classes strength and dexterity. Here's the character class constructor. Since the random number generator is based on time, both strength and dexterity have the same value when they're initialized. Is …

Member Avatar for mrnutty
0
236
Member Avatar for Qu4n7um

Well I'mm 14 years old and I'm very interested in learning some programing languages like c++ and so on . I don't know were to start at , or what to do i have no money to go buy books to learn , if any one could point me on …

Member Avatar for ichigo_cool
0
180
Member Avatar for computerdummy30

I am supposed to write a food menu program for this one summer class an i have been trying for the past 2 hours to figure it out. Directions: Write a program which allows the user to choose a beverage, sandwich and side order from a menu. After the choices …

Member Avatar for EngSara
0
84
Member Avatar for chade25

I am trying to write my own shell. I am having problems with the user input part. I have made an array (char inputBuff[512]) and I want to read in user input. I am using ffputs() and ffgets() but I want to limit the person to the 512 size, and …

Member Avatar for chade25
0
114