49,757 Topics

Member Avatar for
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
106
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
226
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
99
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
120
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
593
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
81
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
122
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
176
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
166
Member Avatar for fox64
Member Avatar for fox64
0
29
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
150
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
161
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
155
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
213
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
113
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
201
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
467
Member Avatar for Bart_sg

[CODE]#include <iostream> #include <iomanip> #include <string> using namespace std; int main() { double V,I,pf,Ib; unsigned short int choice; int In = 0; cout<<"Please choose power supply type\n"; cin>>choice; switch(choice) { case 1:cout<<"You have chosen a single phase power supply\n"; break; case 2:cout<<"You have chosen a three phase power supply\n"; break; …

Member Avatar for tkud
0
141
Member Avatar for nola_Coder

I have an animated sprite animal character that runs across the screen using the arrow keys. It is a series of 7 individual frames. The first frame is its "sitting" position, which is as of now only called when the program starts. I want the animal to return to it's …

Member Avatar for nola_Coder
0
141
Member Avatar for riotburn

I am trying to find the yield of a bond given the bond price, coupon, and semiannual three yr bond using newtons method. The value for B in the output should about equal 101. I have checked everywhere for errors but cant find any. Any ideas? And yes I am …

Member Avatar for riotburn
0
148
Member Avatar for greatunknown

if I have a class... [code] class Note { private: string step; string octave; string duration; }: [/code] with the appropriate access functions, and then create a class [code] class Measure { private: vector<class Note> Measurenum; }; [/code] What is the best method to access the data (presumably step, octave, …

Member Avatar for mrnutty
0
105
Member Avatar for Stefano Mtangoo

Hi all, how can I disable internet in windows/Linux machine. I want to disable completely and enable it at will using C++ Thanks

Member Avatar for Stefano Mtangoo
0
90
Member Avatar for rcmango

Hello, i am very interested in the c++ language, i decided to make my own small program and test how arrays work with classes with private variables and private operations and then calling them any way i'd like from the main function. a very big reason about this is probably …

Member Avatar for rcmango
0
118
Member Avatar for smeghead007

Ok what im tryin to do is open a file by the name a user request after that i ask the user and id number to look for in the file if its found i want to display it along with the name after it but i cant figure out …

Member Avatar for WaltP
0
102
Member Avatar for M.FARAG

I have downloaded a library from this site that deals with Matrix and Complex........Does it do this correctly??? [URL="http://www.zenautics.com/matrixdoc/index.html"]http://www.zenautics.com/matrixdoc/index.html[/URL] if so I want to use this library to get the inverse matrix of of a matrix consists of a complex elements how can I do this??? If it is a …

Member Avatar for WaltP
0
108
Member Avatar for kratosaurion

Hi guys and gals, 1st post here! Woot! With that out of the way, I need some help with this steaming fresh BJ program. I need to write functions for the yes deal and no deal options, but the player total seems to get messed up somehow and when a …

Member Avatar for Lerner
1
80
Member Avatar for crozbme

I am trying to count the characters in a linked list. I am receiving a compiler error when this function is tested... **invalid types `char[int]' for array subscript ** [CODE]int slist::count_c(char c) const { slistelem* temp = h; int count = 0; for (int i = 0; i != '\0'; …

Member Avatar for Ancient Dragon
0
122

The End.