49,766 Topics

Member Avatar for
Member Avatar for ttunstall07

i am trying to work on an assignment that asks me to prompt the user for a name of one of three employees, then prompt for the work hours of 6 days. each of these will be stored in a separate array. then i am to implement the following rules …

Member Avatar for jonsca
0
79
Member Avatar for mebob

Hi, i am doing my mom's c++ for engineering class, and doing a project for her, i noticed something in the extra credit section of her project directions. it says to add graphics to represent what variables the users are entering. in this one, it is about beam deflection, and …

Member Avatar for mebob
0
119
Member Avatar for Bigojac2000

Each of the two food stores, A and B, of the same company has a list of products that are available in its stock. We assume that the standard input contains NA records for food store A and NB records for food store B. Each record describes the code of …

Member Avatar for NathanOliver
0
189
Member Avatar for silvert122

i am trying to write this program and i have no clue how to do it. Could someone help me please. thank you! a) The program implements insertion sort, merge sort, quick sort, and counting sort as subprograms or classes; b) The program reads input from a data file specified …

Member Avatar for Nick Evan
0
101
Member Avatar for steven1285

i need to write a C++ program that reads a sequence of integers and saves it into an array. Your program has to check whether each integer n in the sequence is perfect using a brute force approach. That is, your program should use all possible divisors of n from …

Member Avatar for Fbody
0
83
Member Avatar for Bigojac2000

A positive integer number n is said to be perfect if it is equal to the sum of its proper divisors. In other words, n is equal to the sum of its positive divisors excluding itself. For example, 6 and 28 are perfect numbers. Indeed, we have: 6 = 1 …

Member Avatar for strmstn
0
281
Member Avatar for photoyid

So I am working on a faux graphics program for class. The current part that I am working on is to determine just from top left and bottom right corners what the coordinates should be. I believe my logic is good but it seems to be setting it as tl(3,1) …

Member Avatar for WaltP
1
147
Member Avatar for munadel

In a C++ function How to check if the minimum and maximum values of an array are not equal and the minimum and maximum values of the array are not adjacent to one another. Also the minimum value occurs exactly once in the array and the maximum value occurs exactly …

Member Avatar for WaltP
1
109
Member Avatar for iamvish

Hi all, How to find free physical memory... I am using new operator to allocate memory.. I tried GlobalMemoryStatus (windows api) to analyse the current free memory. new is giving exception still GlobalMemoryStatus shows sufficient free memory.. I am using visual studio 2005 for development. and I want to avoid …

Member Avatar for WaltP
0
84
Member Avatar for clutchkiller

[code] #include <iostream> using namespace std; template <typename T> T total(T numValues) { } int main() { cin.ignore(); cin.get(); return 0; } [/code] Write a template for a function called total. The function should keep a running total of values entered by the user, then return the total. The argument …

Member Avatar for clutchkiller
0
943
Member Avatar for sikeufoo

I am a newbie to c++... Today I was handed a assignment on "array"...While working on this...I've met plenty of errors... I wonder where did my steps gone wrong... May anyone out there borrow me a helping hand?? [CODE]#include <iostream> #include <iomanip> using namespace std; float calpricetopay(int[5],float[5]); // function declaration …

Member Avatar for sikeufoo
0
107
Member Avatar for tajendra

In c++ pre and post operator are used with variables where one need to just increment or decrement value by 1.For incrementing value ++ operator can be used and for decrementing -- operator can be used. Its use is very simple one can easily say ++i or i++, to increment …

0
232
Member Avatar for marlowd

If you have some DACL permissions on a file, you can use SetFileSecurity() to change the permissions to something else, but what happens when someone deletes all of the DACL? Now you no longer have WRITE_DAC permissions, so you can not modify any discretionary ACE's to it. I have administrative …

Member Avatar for mitrmkar
0
100
Member Avatar for silvert122

Hello guys, i am trying to write an insertion sort program with any values entered by any users but im getting some weird numbers. could someone help me see what s wrong with my code. this is my code: [code]#include <iostream> using namespace std; int main() { int a,b,c,d,e,f; int …

Member Avatar for peter_budo
0
123
Member Avatar for rms360

i've done a of couple searches on this board and i haven't really found any answer to this. so- how can i get graphics into my c++ programs. From the books i've been looking through there aren't many, if any graphic commands, in the .net and visual c++ versions of …

Member Avatar for khalil88
-1
604
Member Avatar for squarey

Hi Guys, I am trying to write some regex to process a string. I have been reading up the boost documentation and noticed there are many differences between the way C++ regex is written and the way I am used to writing regex in web apps (J2EE, PHP etc). Can …

Member Avatar for Narue
0
82
Member Avatar for mattloto

I am preparing for a programming competition soon and for one of the sample problems one line of input is the length of the list of numbers and the second line is the actual numbers. this is what i have: void main() { int num; cin >> num; int items[num]; …

Member Avatar for Narue
0
123
Member Avatar for jch02140

Hi, I am still new to C++ and I am having a little trouble compiling the following code, and couldn't figure out what went wrong: [CODE]#include <iostream.h> #include <string.h> using namespace std; float x = 5.0f; int _65Num = 65; int mian() { string str = "Hello World!"; cout << …

Member Avatar for Fbody
0
177
Member Avatar for bhp2005

Having a problem setting user input to a dynamic array. It worked with a static array, but now I'm having some kind of pointer issue. The user sets the dimensions and enters in a number of characters, which should be set to the array 'gameboard'. it's just setting jibberish though. …

Member Avatar for bhp2005
0
170
Member Avatar for fox64
Member Avatar for fox64
0
31
Member Avatar for squarey

Hi Guys I was doing some reading up on data structures to refresh my memory when I came across the following: pmovie->title *pmovie.title source: [url]http://www.cplusplus.com/doc/tutorial/structures/[/url] pmovie is pointing to an instant of a struct. I know the arrow operator is a dereference operator for objects and I thought *pmovie.title was …

Member Avatar for Fbody
0
152
Member Avatar for iamvish

Hi all, How to find the free physical memory... actually i want to avoid the exception from new operator.. i have used the [B]GlobalMemoryStatus[/B] a windows api for this but new is giving exception still more memory available than i am allocating. I am using visual studio 2005 Please help …

Member Avatar for Ancient Dragon
0
169
Member Avatar for richman0829

This seems simple, but it's not working. There IS a text file in the same directory, but it's not being opened (and with the ios::in | ios::out, it should open even if it doesn't exist). I also ran into trouble trying to use infile.fail, which is why I used !infile. …

Member Avatar for richman0829
0
159
Member Avatar for avataralien

[CODE] try{int x = 0; cin>> x; if ( x > 100) throw 1; else cout<< “Good data”<< endl; } catch ([COLOR="Red"]int i[/COLOR]) { cout<< “Exception “<< i << “thrown”<< endl; }[/CODE] I need to know why the catch is int i & not int x?

Member Avatar for MyrtleTurtle
0
69
Member Avatar for ehsun7b

Hi I'm using [B]NetBeans + GCC[/B] in Linux and also [B]NetBeans + MinGW[/B] in Windows. I need to run an OS Command e.g.: [ICODE]java -jar myjar.jar[/ICODE] I prefer [B]not[/B] to have the terminal/cmd window. It works fine in Linux, but in windows, it ends up in opening a [B]cmd[/B] window …

Member Avatar for Nick Evan
0
215
Member Avatar for alexRivera

i've been having trouble just figuring out the merging part of the code. here's the main. everything works except for the merge part that is at the end of the code. [CODE] main() { HeapSort heap1; HeapSort heap2; int one, two; int x = 0; int number1,number2; cout<< " Enter …

Member Avatar for GrubSchumi
0
114
Member Avatar for marcelomg

Hello, I'm stuck with this code and I can't figure out how to make it work. I need to get the Sum of Odd numbers from an array. For some reason it returns 0. I'm new to programming, so any help would be appreciated, thanks. Here it is: [CODE]#include <iostream> …

Member Avatar for syd919
0
208
Member Avatar for dsa

Hi! I get an assignment where I should create c# wrapper class for sdk written in c++ which contains bunch of dlls, libs and hpp files. Can you give me some directions how shall I do it? I didn't have luck from google-ing. Regards, DSA

Member Avatar for kvprajapati
0
34
Member Avatar for harshareddy75

Hi all, Presently I am using winhttp api in c++ to get data from a server. The server can support various compression formats. So presently I want to use winhttp to get the compressed format (eg gzip) and decompress it. Is it possible to decompress the data using winhttp? thanks …

0
62
Member Avatar for techie1991

Hello, I was trying to implement data structures using file operations. I am using a data structure of two integers, one being the index number and other being the value. My actual aim is to recreate the file containing the data using a log. But, the program isn't running as …

Member Avatar for WaltP
0
479

The End.