49,757 Topics
| |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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]; … | |
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 << … | |
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. … | |
So are there any good piping & threading tutorials out there? | |
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 … | |
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 … | |
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. … | |
[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? | |
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 … | |
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 … | |
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> … | |
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 | |
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 … | |
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 … | |
[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; … | |
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 … | |
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 … | |
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, … | |
Hi all, how can I disable internet in windows/Linux machine. I want to disable completely and enable it at will using C++ Thanks | |
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 … | |
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 … | |
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 … | |
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 … | |
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'; … |
The End.