Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+5
Strength to Decrease Rep
-1
86% Quality Score
Upvotes Received
12
Posts with Upvotes
11
Upvoting Members
11
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
2 Commented Posts
1 Endorsement
Ranked #857
Ranked #818
~43.2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for cdea06

So I just started a "C" class and I've done my first few assignments but I feel like I'm over complicating the codes by using to many if else statements. Here's the assignment and my code. Please let me know what you think: [B]Write a program that asks the user …

Member Avatar for rubberman
0
296
Member Avatar for subith86

I am planning to write an application in windows which will temporarily block the configured websites irrespective of what browser I am using. As I am completely a newbie in this I want to know where to start. Please provide me with any useful links which can help me. If …

Member Avatar for deceptikon
0
122
Member Avatar for dpsh

Hi, pls try to observe the size(i.e. total) of object for below program and in different cases as commented out. #include<iostream> using namespace std; class B { int x; // try by commenting either data member and observe the object size int *p; public: virtual void show(){} }; int main() …

Member Avatar for dpsh
0
90
Member Avatar for subith86

I have a code which gives the maximum value I can get by filling the knapsack with the optimal set of weights. int arr[5] = {0, 0, 0, 0, 0}; int Weight[5] = {2, 5, 8, 7, 9}; int Value[5] = {4, 5, 7, 9, 8}; const int n = …

Member Avatar for Lucaci Andrew
0
222
Member Avatar for vincent5487

Write a program that prompts the user to input the start time and the stop time in hours and minutes (use 24 hour format), and then print out the time spent in work in hours and minutes. For example: Enter start time : 9 30 Enter finish time : 13 …

Member Avatar for subith86
0
202
Member Avatar for dakoris73

Hello everyone; I've been struggling with trying to figure out how to get this struct program to work and I'm at a total loss on this. Basically I need to create two structs POINT which will have an X and Y values, and a LINE struct which will include 2 …

Member Avatar for subith86
0
127
Member Avatar for mrexp21

I have a file, 'date-list.txt' which has date in it. For example , 20 May 2012 . Now I want to compare this date with current system date and show the difference in days . How can i compare dates and shows difference in days in C++.? Im really a …

Member Avatar for subith86
0
138
Member Avatar for pokie_da_codie

Instead of using User input , how can I take an parameter input and convert it to a string, where I can than check for for input values. char values[17] = "0123456789ABCDEF" ; char numIn[15]; int num[15]; int ob, nb, i;

Member Avatar for thines01
0
283
Member Avatar for subith86

Anybody of you got any idea what this "internal compiler error: Segmentation fault" means? I searched internet, but didn't get anything useful. Then I did my analysis. I found out something peculiar. The code that I am trying to compile is a file for unit testing one of our classes. …

Member Avatar for mitrmkar
0
3K
Member Avatar for caltech

okay so here's my code but i knwo there's just something so wrong with the second/youngest one. the first/oldest part works though. int oldest = 0; // Determine and print oldest employee(s): for (int i=0; i<recordlist.size(); i++) { if (recordlist[i].age > oldest){ oldest = recordlist[i].age; } } cout << "Oldest …

Member Avatar for NathanOliver
0
934
Member Avatar for dmoneyrpyt

# Can someone help me with this program by fixing it I should finish it before tomarrow and I don't know where I went wrong# #include<stdio.h> //header file #include<conio.h> //header file #include<stdlib.h> //header file #include<time.h> //header file #include<math.h> //header file #define PI 3.14159 //header file indicating that pie is equal …

Member Avatar for DJSAN10
0
231
Member Avatar for shreddinit

Attached is my code for my homework for my C++ class. My problem comes from when I run the program. It returns a value of 1 every single time for the output of the "is it a leap year or not" part of my program. Then, when it outputs the …

Member Avatar for shreddinit
0
292
Member Avatar for Silver-Eye

So I'm fairly sure I have everything in the correct order, it compiles correctly, but when I try to run I just crash after the first Employee ID input. I've tried all i can think and have searched the web yet can't figure out why it crashes. [CODE] #include <stdio.h> …

Member Avatar for zeroliken
0
163
Member Avatar for subith86

Hi, I have overloaded assignment operator like below and it worked perfectly fine. [CODE]void Test::operator = (Test& obj) { this->a = obj.a; this->b = obj.b; } [/CODE] But when I googled more about this, I could see all of the examples used a different prototype like this [CODE]Test& Test::operator = …

Member Avatar for subith86
0
132
Member Avatar for coxxie

Need some help. My game locks up when you go to load file and it just locks up. Please help. [CODE] /* WumpusGame header file Contains the WumpusGame Class. This is the main workhorse of the program, and contains all of the global data, including the master world map. WumpusGame …

Member Avatar for coxxie
0
3K
Member Avatar for prasenjit_das

hi all, How i do very large numbers division and also modulo division in c++ thanks in advance

Member Avatar for subith86
0
67
Member Avatar for Sh0gun

I'm trying to find the mode of a vector full of ints. To do so I created a map an tried to make it so that evey time a number occurs it increments the related key on the map. Right now I'm just getting the highest number in the vector …

Member Avatar for subith86
0
174
Member Avatar for prasenjit_das
Member Avatar for Ali_2101
0
150
Member Avatar for MochiAnjali
Member Avatar for subith86
0
199
Member Avatar for picogenkaku

Good day to everyone. I have this trouble of stopping the timer at a specific time, say I have to stop the timer at 1:30. When I try to run it, it doesn't stop. Please help. Here's my C++ code. [CODE] #include <iostream> #include <time.h> using namespace std; void wait …

Member Avatar for picogenkaku
0
235
Member Avatar for general07z

Hello, This code is for (hospital management system). This code allow you to add patients. There are two types of patients. which is: 1. Normal patient. 2. Critically ill patient. once you added any patient. You will be able to show all patient using "ShowAllPatient;" method. -> i want the …

Member Avatar for WaltP
0
1K
Member Avatar for phorce

Hello, basically I want to return an array from a function (So I don't output things in the class - just main) But I seem to get the error: "invalid types 'int[int]' for array subscript" Here is the code: [code] #include <iostream> using namespace std; int matrix() { int matrix[10] …

Member Avatar for phorce
0
197
Member Avatar for pattmorter

I was studying for an exam and came across two questions that me and my friends didn't know the answer to. We are given the answer but we just can't figure out what the answer is what it is. First, why does this code give an error? [CODE]int z=5, q=2; …

Member Avatar for Ali_2101
0
192
Member Avatar for nell16

Pls help me on this. I really dont have an idea of solving this. Here's the question .. 1. Write a c++ program that generates the following series: 0 -1 4 -9 16 -25 36 -49 64 -81 100 and also this one 2. write a program that generates the …

Member Avatar for Ali_2101
0
242
Member Avatar for butler273

So, as follows I have a basic while loop. It's working fine, however whenever I enter something other than a number or EoF, it goes through the loop one time after I'm wanting it to stop. Say I enter 5, then EoF, it enters an extra 5, so I have …

Member Avatar for subith86
0
150
Member Avatar for shean1488

Hi everybody. I'm trying to write the program that will read the file and delete blank spaces ONLY after the text. here is the text : [CODE]serg@serg-PORTEGE-Z835:~$ cat sample.txt Now is the [/CODE] here is the the same in hex: [CODE]serg@serg-PORTEGE-Z835:~$ od -x sample.txt 0000000 2020 2020 2020 2020 2020 …

Member Avatar for subith86
0
139
Member Avatar for arubajam

Write a statement that declares and stores the elements of the following array into a vector object: char vowels[5]={'a', 'e', 'i', 'o', 'u'}; I think this is what I need, but I want to verify this. [CODE]char vowels[5]={'a', 'e', 'i', 'o', 'u'}; vector<vowels> vowelsList (vowelsArray, vowelsArray +5);[/CODE]

Member Avatar for subith86
0
177
Member Avatar for shean1488

Hi everybody. I'm new in C and would like to know how to delete last elements in the array? lets say I have array arr = {1,2,3,4,5} and whant to delet last two elements. is it possible to do?

Member Avatar for Smileydog
0
10K
Member Avatar for chamika.deshan

Hi I came accross a code and i din't understand it Template.h [CODE] #define FRIEND_NEW template<class T> friend inline T* ::safe_new(const char*,int); template<typename T> inline T* safe_new0(const char* file, int line) { T* ptr = new T(); return ptr; };[/CODE] A.h [CODE] #include "Template.h" class A { FRIEND_NEW protected: A(); …

Member Avatar for L7Sqr
0
160
Member Avatar for bennetk2

I can't figure out what this error is saying. Error: C:\Users\Kyle\School\CS 372\Statistician\Statistician.cpp||In function 'bool operator==(const statistic&, const statistic&)':| C:\Users\Kyle\School\CS 372\Statistician\Statistician.cpp|225|error: passing 'const statistic' as 'this' argument of 'float statistic::sum()' discards qualifiers| C:\Users\Kyle\School\CS 372\Statistician\Statistician.cpp|225|error: passing 'const statistic' as 'this' argument of 'float statistic::sum()' discards qualifiers| C:\Users\Kyle\School\CS 372\Statistician\Statistician.cpp|226|error: passing 'const statistic' as …

Member Avatar for gusano79
0
332