Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
72% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
2
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
1 Commented Post
0 Endorsements
Ranked #1K
~19.6K People Reached
Favorite Tags
Member Avatar for sgw

In the following program I declared "long" for a, but still getting incorrect negative output after the 1860th term (all are supposed to be positive). What is the cause? int main() { for (int i=1; i<=2000; i++) { long a=i*i*i/2-3*i*i/2+3*i-1; cout << setw(3) << i << "\t" << setw(8) << …

Member Avatar for asifalizaman
0
254
Member Avatar for Hey90

I would like to convert a procedural database program that I have created to an object oriented program. In my procedural program I use a struct: struct shoes{ char Name[20]; int Number; double ShoeSize; }; Putting this into a class would I simply use: class Shoes{ public: //Function declerations private: …

Member Avatar for Hey90
0
612
Member Avatar for tanmay.majumdar2

#include<iostream> #include<conio.h> using namespace std; char square[10] = {'o','1','2','3','4','5','6','7','8','9'}; void box(); int checkwin(); int main() { char f, g, e[10]={'o','1','2','3','4','5','6','7','8','9'}; int a; int c, d; for(a=1;(a<=9);a++) { int b; system("CLS"); box(); if(a%2==1) { cout<<"player 1 enter your num\n"; cin>>b; } else { cout<<"player 2 enter you number\n"; cin>>c; } if(b==1&&square[1]=='1') …

Member Avatar for CGSMCMLXXV
0
166
Member Avatar for GeneClaude

In this code, I need to put a limitation in every part where the user is asked to input data. The user will be asked to input a grade ranging from 50-100, and if his input is not in the range, the program will display a warning, and if the …

Member Avatar for CGSMCMLXXV
0
241
Member Avatar for Beteabmlemma

Pleace help me with this!!!how can we change a decimal number into binary,octal and hexadecimal using c++????

Member Avatar for programmer007
0
364
Member Avatar for Kareem Klas

Hello members, I have started studying C++ with the book "C++ primer"( by Stanley B. Lippman, Josée Lajoie& Barbara E. Moo). I use Visual Studio 2012 Ultimate and make my projects on Win32ConsoloApllication. There was an example and I wanted to make it over for myself. #include <iostream> int main() …

Member Avatar for Kareem Klas
0
174
Member Avatar for McLaren

Hello, I am following this series http://net.tutsplus.com/tutorials/javascript-ajax/build-a-contacts-manager-using-backbone-js-part-5/ and everything ws fine when was working with just javascrtript and html. But now I want to put it together with php fraework and I cannnot get it to work. It does not draw select box first of all. And does not draw …

Member Avatar for McLaren
0
238
Member Avatar for Petcheco

Hello everyone. I saw a post of one of our friends here about a problem he found of the SPOJ website. So I went there to check it. I found it to be very cool; I started to do the exercises but when I got in the 2nd, a prime …

Member Avatar for Petcheco
0
202
Member Avatar for ziadkassam
Member Avatar for ziadkassam
0
699
Member Avatar for uzair.tabassumwahla

#include<iostream.h> #include<conio.h> #include<stdio.h> #include<math.h> main() { system("cls"); int h,w,m; cout<<"Press1,if you are male"<<endl; cout<<"press2,if you are female"<<endl; cin>>m; if(m==1) { cout<<"you are male"<<endl; } if(m==2) { cout<<"you are female"<<endl; } cout<<"Enter your height="; cin>>h; cout<<"Enter your weight="; cin>>w; if(m==1) { if(h<60) { cout<<"you are unfit"; } if(h>=60&&h<65) { if(w<45) cout<<"you …

Member Avatar for Moschops
0
172
Member Avatar for uzair.tabassumwahla

#include<iostream> using namespace std; int main() { for(int i=0;i<13;i++) { cout<<"*"; if(i==0 || i==12 ||i==9) { for(int j=0;j<10;j++) { if(i==9 && j==0) { cout<<" "; } else cout<<"*"; } } else if(i==10) { cout<<" "; cout<<"*"; for(int j=0;j<7;j++) { cout<<" "; } cout<<"*"; } else if((i==1 || i==2 || i==11)) …

Member Avatar for CGSMCMLXXV
0
197
Member Avatar for sravya reddy
Member Avatar for lewashby

Can anyone tell me whay the following funtion that should be returning true if the year is leap year and false if it is not, is givign me unexpected results? when I entered 1985 I got true? when I entered 2012 I got false. When I entered 2000 I got …

Member Avatar for lewashby
0
190
Member Avatar for Hopp3r

So I was asked to write some simple functions that would search through an array of length (s) and tell how many times an (integer, double etc. ) appeared within the array. It's pretty simple because they give you the length of the array. However one of the functions doesn't …

Member Avatar for NathanOliver
0
2K
Member Avatar for babuliy

i wanna know ina easy way what do we ,mean by inheritance and hybrid inheritance in c++

Member Avatar for CGSMCMLXXV
0
133
Member Avatar for finders

Hey, I have never programmed before, so everything is very confusing for me. I was given an assignment to change binary to a decimal number. Not very much information was given to me. I am NOT looking for an answer, but I definitely am looking for some help as to …

Member Avatar for CGSMCMLXXV
0
790
Member Avatar for Doogledude123

Im reading a text file and storing the characters in an array. I get a "Unhandled exception at 0x0109985e in Executable.exe: 0xC0000005: Access violation writing location 0xcccccccc." void drawMap(string MapLoc) { int i = 0; int x = 0; int y = 0; char* arrayMap[5225]; ifstream mapReader; mapReader.open(MapLoc); for (i …

Member Avatar for Doogledude123
0
279
Member Avatar for myk45

Hello All, i have a small question regarding casts in C++. 1) Now, dynamic_casts ensure safety with casts. ie. for example: for the below polymorphic class: class Base { public: virtual void foo() {} }; class Derived : public Base { }; int main() { Base *bPtr = new Base; …

Member Avatar for myk45
0
569
Member Avatar for Elixir42

Hi I am allocating memory space and adding nodes like this: CSprite* pNewSprite = new CSprite; // Create new sprite pNewSprite->iData = iChoice; // Attach data EnemyList->AddNode(pNewSprite); // Send to AddNode and also in the ::AddNode: void CLinkedList::AddNode(VOID* pData) { CNode* pNewNode = new CNode; // Create the Node pNewNode->pData …

Member Avatar for Elixir42
0
230
Member Avatar for smepperson

Hi, I have the following code for a potential handlbars.js tmpl. It compiles correctly at tryhandlebarsjs.com however when I attempt to open the file independently in a browser the default text in the div is the only thing that renders. I know my .json call is wrong but I cannot …

Member Avatar for smepperson
0
420
Member Avatar for saraaw

An integer double-dimensional array called hotel is used to keep track of reservations in an hotel of 5 floors each floor having 8 rooms. The floors are numbered 1, 2, 3, 4, and 5, and the rooms are numbered 1, 2, 3… 8. Write a C++ program to manage the …

Member Avatar for Doogledude123
0
348
Member Avatar for deceptikon

For those of you familiar with the latest C++ standard, what do you think of [uniform initialization](http://en.wikipedia.org/wiki/C%2B%2B11#Uniform_initialization)? Listening to folks like Herb Sutter, it seems like the intended purpose is to be completely pervasive, which obviously changes the look and feel of C++. Do you plan on using it everywhere …

Member Avatar for vijayan121
0
412
Member Avatar for ashleytauari

#!/bin/bash LOGFILE=/var/log/backup.log backup_source="/home" backup_dest="/home/sean" date=`date '+%d-%B-%Y'` hostname=$(hostname -s) filename="$hostname-$date.tgz" echo "Backing Up your Linux System" tar cvpzf $backup_dest/$filename $backup_source LOGFILE="log-$date.log" log(){ message="$@" echo $message echo $message >>$LOGFILE } log "$LOGFILE" log | tee install.log echo "Backup finished" echo "$LOGFILE" hie I'm trying append teh files i have backed up into …

Member Avatar for CGSMCMLXXV
0
182
Member Avatar for hwoarang69

other day i got a email saying they want a internview on postion "Linux Systems Programmer". the problem is that i have not used Linux for about 4 to 5 yrs. and forgot most of the stuff. can some one tell me important topics in linux programming? that way i …

Member Avatar for CGSMCMLXXV
0
145
Member Avatar for Archit Gupta

#include<iostream.h> #include<conio.h> #include<stdio.h> #include<process.h> struct room { char type[3]; int rmn; int terrif; }; void add(room *,int); void main() { clrscr(); int n,r,modifychoice,c,a,i; room rm[5]; cout<<endl<<endl; while(1) { cout<<"\t\t\t"<<"HOTEL DAVIANS"<<endl<<endl; cout<<"\t\t "<<"MENU FOR HOTEL DAVIANS -"<<endl; cout<<"\t\t"<<"1. Enter rooms record for the hotel "<<endl; cout<<"\t\t"<<"2. Modify rooms records"<<endl; cout<<"\t\t"<<"3. Check …

Member Avatar for Archit Gupta
0
269
Member Avatar for victor tawiah

am to create a program that calculates the marks of unknown number of students in a class and arrange them in an order of merit. pls help

Member Avatar for victor tawiah
0
106
Member Avatar for lewashby

In the program below I need to get month to hold the first two digits of date, day two hold the digits 3 & 4, & year to hold the last four digits. Any idea on how I can accomplish that? #include <iostream> #include <string> #include "functions.h" int main() { …

Member Avatar for lewashby
0
394
Member Avatar for deceptikon

C++ conversion of [this C snippet](http://www.daniweb.com/software-development/c/code/445012/simple-interactive-menu) for a simple interactive menuing system. The code shows three files: * menu.h: The header file for the menu class. * menu.cpp: Implementation of the menu class. * main.cpp: A sample driver that uses the library. The menu library is fairly generic in that …

Member Avatar for tinstaafl
2
3K
Member Avatar for lewashby

In the following program, when I enter a number I'M getting strange output back. When I enter 5 I get 0x6011a85 back on the cout << "you entered" line. #include <iostream> //#include "functions.h" int main() { std::cout << "Please enter a number. " << std::endl; int date = 0; std::cin …

Member Avatar for CGSMCMLXXV
0
88
Member Avatar for lewashby

I need to store the number of digits from a number into a variable. e.g. 538, i need to store 3. How can I accomplish this is C++? Thanks.

Member Avatar for Moschops
0
102