51,592 Topics

Member Avatar for
Member Avatar for vrga

I am having trouble reading the second matrix from my file. Can anyone help me please? Thank you!

Member Avatar for vrga
0
115
Member Avatar for gangsta1903

I want to create a class for I/O operations. This class take filename as parameter and then provides functions to write and read from file. I had to include two different fstream objects,one for input and one for output ,so I designed such an implementation.If you can see a better …

Member Avatar for gangsta1903
0
137
Member Avatar for amrith92

I've made a program that generates a Character's details(Game details, like level, name, HP, etc, based on a few parameters). I've added another .cpp file to it [without a main() function], but when I try to compile the whole project in Dev-Cpp, it just shows an error. My code is: …

Member Avatar for TheBeast32
0
162
Member Avatar for ART01

I have got stuck with a very basic prb in Linked lists, i m familiar with array, as in array to compare two elements of the array u can simply use their position in the array since they are all positioned in a consecutive manner in memory like: if(arr[2]<arr[3]) //do …

Member Avatar for sidatra79
0
109
Member Avatar for scholar

Hi friends, The problem is to find out the factorial of a large number say 20 and display it purely in terms of numbers not like 2.333e23.

Member Avatar for ohnomis
0
104
Member Avatar for ohnomis

Hi, I've just started a course in C++ about 3 weeks ago. Unfortunately, I'm pretty lost at the moment with this problem and my teacher said I'm on my own now. (I'm guessing he doesn't want to answer my questions anymore because I ask too many, but I really don't …

Member Avatar for ohnomis
0
534
Member Avatar for mzdiva041986

How do I add deletion to my program?????? [CODE]#include <iostream> #include <set> using namespace std; int main () { set<int> myset; set<int>::iterator it; pair<set<int>::iterator,bool> ret; // set some initial values: for (int i=1; i<=5; i++) myset.insert(i*5); ret = myset.insert(15); if (ret.second==false) it=ret.first; myset.insert (it,8); myset.insert (it,9); myset.insert (it,11); int myints[]= …

Member Avatar for twomers
0
109
Member Avatar for justinlake888

If the question says... "user can enter input up to five times" - does that mean you use a "for loop" since you know the # of times? or do you just use a "while loop" please help. thanks.

Member Avatar for Sci@phy
0
99
Member Avatar for scholar

Hello friends, there is yet another problem for you... We have got a string say HOUR Now we need a program that can choose the specified number of words say n from this word in all possible ways and displays them ...for example in this case for n=3 the output …

Member Avatar for Sci@phy
0
111
Member Avatar for Jennifer84

I am using StreamReader to read a File. With the code below I am able to read a whole line. What I wonder is how it is possible to read a comma delimited file like these lines. How will I put the delimiter ',' and also assign the values to …

Member Avatar for Jennifer84
0
262
Member Avatar for ShadowOfBlood

I'm working on this as an assignment for Computer Science 121. I thought I had the code working, but I couldn't figure out one crucial part. The assignment is to convert phrases (such as 'GET LOAN' or 'CALL HOME') into telephone numbers (438-5626 and 225-5466 respectively). The program has to …

Member Avatar for ShadowOfBlood
0
1K
Member Avatar for gotnoname

Heya, could use some help from any nice fellah around. This is a highscore that sorts by score[index] and then name[index] follows. There's some more features I would like to add to it like a menu e t c, but for now I want the basic thing working asap. Help …

Member Avatar for gotnoname
0
207
Member Avatar for cam875

im writing my own assembler and the only thing that is going wrong is reading the input from the source file I dont no how to read one word at a time so if i have a statement like mov 25 3 it can read mov store it than 25 …

Member Avatar for cam875
0
206
Member Avatar for bone7_7

Im trying to learn c++ in school but the book does not break it down FOR ME ENOUGH, could some body suggest a book like c++ for dummies or something that would really help me out. Im engineer major in my sophmore year and I have plenty more programming ahead. …

Member Avatar for RaiTsu
0
115
Member Avatar for RayvenHawk

I'm working on an assignment and I need to swap the values from the left side of the tree to the right side and vise versa. I'm having no luck on it so far. Here is the header file with the important areas [code] template<class elemType> struct nodeType { elemType …

Member Avatar for Sci@phy
0
247
Member Avatar for saneeha

I want to use the function GetFileSecurity() to retreive the security descripter of a file in the Master File Table from NTFS.. The function definition is [code] BOOL WINAPI GetFileSecurity( __in LPCTSTR lpFileName, __in SECURITY_INFORMATION RequestedInformation, __out_opt PSECURITY_DESCRIPTOR pSecurityDescriptor, __in DWORD nLength, __out LPDWORD lpnLengthNeeded ); [/code] The fifth attibute …

Member Avatar for Ancient Dragon
0
175
Member Avatar for ashishchoure

I got the latest Direct X SDK and Microsoft Visual Studio and I want to learn how to code games in C++. I self learn most of my coding, but I want to know a straight out beginners book for C++ and Direct X Gaming. Can you guys suggest anything?

Member Avatar for Ancient Dragon
0
68
Member Avatar for Royalwolf

hello friends i start learning c++ and still at basics and was trying to solve a exercise in second chapter. this exercise asked to print a square using asterisks. i am able to create a asterisks solid square and colde is as follows. [CODE]# include<iostream> using namespace std; int main() …

Member Avatar for Royalwolf
0
3K
Member Avatar for yazooney

Very basic questions but hard to find in google! [CODE]return sqrt(eps - 2.*log(eps + rand()/(double) RAND_MAX))*cos(rand()*pi2/RAND_MAX);[/CODE] The part of the formula where it says "2.*log". I belive the "dot" only represnts that the number 2 is 2.0. However, I am not 100% sure about this as I actually dont see …

Member Avatar for Ancient Dragon
0
88
Member Avatar for asifjavaid

Hi guys, Hope you are fine by all means. I am developing a video plugin in VC++.NET by using directshow filters. My software is getting input of wmv file and it will be uncompressed generating two files video and audio. Now i want to get input for MPEG-2 video format. …

0
92
Member Avatar for xtint

Hi everyone Am new in the software development world and am trying to come up with a login application that checks username and password from the database.Please if anyone can give me a heads up i would really appreciate thnx jerry

Member Avatar for jireh
0
113
Member Avatar for volscolts16
Member Avatar for launic

I have a text file that in some places have newlines in the middle. For example: My name is Sam. I am a novice programmer. I go to school in Michigan. I use getline() to read through the entire file, and then I send it to a function to tokenize …

Member Avatar for mitrmkar
0
167
Member Avatar for boncher

Hi. I am new to c++ and programing in general and have run into a problem on one of my assignments. I am trying to insert one vector, into a certain spot in another vector. Both are of the same type <string>. My main problem is we have not really …

Member Avatar for ArkM
0
112
Member Avatar for clive2008

Good evening everyone, Firstly, I just want to say this is not homework related. I graduated 15 years ago, but I dabble with C++ purely for a hobby these days but must be getting rusty in some areas. I have a question with regard to string comparisons. What I have …

Member Avatar for ArkM
0
75
Member Avatar for lmastex

Hey again! ;) This time I have this program which is supposed to read some stream file called "numbers.dat" which has the numbers 1 up to 10. I get the reading, but the thing is in the for loop I want to add the numbers in circles. For example: 1 …

Member Avatar for lmastex
0
123
Member Avatar for nizbit

The program I am working on deals with nested linked lists. I have a Olympics class that uses a linked list for events. Events have their own class with a linked list of contestants of a contestant class for each event. I don't understand why I'm getting these compile errors: …

Member Avatar for nizbit
0
132
Member Avatar for MSlattery

[B]Can someone provide me with a short list of the hardware requirements to implement a beta test version of a proposed search engine to be coded in C++?? What hardware will be required just to determine if the logic behind this architecture accurately returns the searcher's intent? As a startup …

0
33
Member Avatar for omdnaik

Hi frnds, i have been programming for abt a yr now n used to consider myself gud wid c programming until i chked out this forum.... Some of U guys are fantastic. So i wud appreciate if ne cud gimme topics on c programming dat will hlp me hone my …

Member Avatar for ssharish2005
0
163
Member Avatar for chanda gul

Hi all Can any1 tell me how to extract the author of a file in ntfs.....any class or method availbe for it???

Member Avatar for Ancient Dragon
0
114
Member Avatar for Matotore

The welcome form It contains a label, a timer and a progress bar. private void Form1_Load(object sender, System.EventArgs e) { timer1.Start(); } This enables the timer to be started when the form is loaded. These other codes have placed it on the tick event of the timer. private void timer1_Tick(object …

Member Avatar for Matotore
0
120
Member Avatar for bone7_7

I am a beginner c++ programmer, I was wondering if somebody could help me get rid of this error [code=cplusplus] #include "stdafx.h" #include<iostream> using namespace std; //declaration of function: convert miles and time, into nautical miles,kilometer,meters,feet,calculat mile per hour,calculate kilometer per hour,calculate meter per second,calculate feet per second,calculate nautical mile …

Member Avatar for bone7_7
0
208
Member Avatar for rajataggarwal91
Member Avatar for Salem
0
67
Member Avatar for unclepauly

i have a bunch of data i want to pass to CreateThread. i created a struct as per the msdn documentation. here it is: [CODE] typedef struct ThreadRecvData { std::list<char> data; Ogre::String addr; unsigned long port; } THREADRECVDATA, *PTHREADRECVDATA; [/CODE] then i initialise the struct, again as per the msdn …

Member Avatar for unclepauly
0
114
Member Avatar for quasimodo

Hi, Im new to the Forum, and I could use a bit of help. I want to code a application that rights meals to a file and generates a weekly menu randomly. I dont have a problem with writing and reading to the file, but I do have a problem …

Member Avatar for starchip
0
486
Member Avatar for VernonDozier

I've been experimenting around with the [ICODE]const[/ICODE] modifier, trying to make sure I understand it and clearly I do not. I wrote this program. Note line 28, where I am changing the value of the parameter passed to a copy constructor, and the word [ICODE]const[/ICODE] on line 40: [code=cplusplus] #include …

Member Avatar for VernonDozier
0
424
Member Avatar for kenji

Hey guys, I have a couple of quick questions, Iv searched the forums and the internet and found a not very much on removing an array element. If you could guide me to a website or a book with information on char arrays it would be helpful. My second question …

Member Avatar for kenji
0
9K
Member Avatar for geemicah

this program is all about computing the bill of the electricity/.// the first 150kilowatts will be 10.00php... then additional kilowats will be add for another 20.00 per kilowatts... In their bill also, there will be additional 5% for the tax... And My prof give this condition in doing the program: …

Member Avatar for geemicah
0
98
Member Avatar for osirus0830

Hello all, I am attempting to learn C++ on my own. I am going through the book C++ Primer by Steven Prada, in case anyone has the book. At the end of every chapter, they give programming problems and I am having trouble with one of the problems. Essentially the …

Member Avatar for arinkverma
0
95
Member Avatar for cwilliam912

I have to redo Programming Exercise 5 of Chapter 9 using dynamic arrays. I have the problem but I don't know how to use it using dynamic arrays please help. //Chapter 9: Programming Exercise 5 [code=cplusplus] #include <iostream> #include <cstring> #include <cctype> using namespace std; int main() { char str[81]; …

Member Avatar for twomers
0
245
Member Avatar for Trekker182

I've read around and made this code to loop through my two strings and add up all of the ascii values of the characters in them. However, it's not working...it's not even iterating. When I look at the cout for h and hi, I get 112 & 205976. Shouldn't it …

Member Avatar for Trekker182
0
128
Member Avatar for gregorynoob

ok, so this is my problem... i have an array of items, which i want to sum to x or above in a most efficient way... is there a way for doing this? cause all the values are 64 bit ints. i tried recursion but it's slow cause i can …

Member Avatar for VernonDozier
0
273
Member Avatar for bhoot_jb

I have been given an assignment to simulate MS Paint application. I am much confused if to use document-view architecture or go without it (i will certainly use MFC..a necessity of our syllabus :| ) Also where exactly should i use/avoid document-view architecture? waiting for a reply ... :)

Member Avatar for Ancient Dragon
0
87
Member Avatar for khushal.kakakhe

as i am new to object oriented programming can any one help me undrestanding function over ridding i know the exact statement of it but i can not implement it in my program please help me giving a programmatical explanation. REGARDS

Member Avatar for Sci@phy
0
57
Member Avatar for cplusplusdummy

Argh! I've been trying to work out this problem for an entire week and i'm now at my wits end! I'm supposed to hand in this assignment in 7 hours and am posting my problem here as a last resort. Can i please have someone's assistance in this? I use …

0
40
Member Avatar for geemicah

hi... I always having a hard time to debug all my errors.. but still, calling some functions are the most painful I guess... Will you help me on how to call some functions? thank you!

Member Avatar for geemicah
0
264
Member Avatar for Repurcussion

[CODE=C++] //bintree.h template<class T> class bintree { private: bin_node<T> *root; public: bintree(void); void insert(const T); void insert(const T, bin_node<T>*); }; //bintree.cpp #include "bintree.h" template<typename T> void bintree<T>::insert(const T input) { insert(input, root); } //tstatcontain is a non-template class-class class tstatcontain { private: string tname; int wins, loses, games, champ, years_playing, …

Member Avatar for grumpier
0
827
Member Avatar for nizbit

I have a class named Contestant which holds all the info on a person playing a game. Then I have a game class for all the different games a contestant could be playing. My linked list in the game class is defined by the contestant class. I need to swap …

Member Avatar for Lerner
0
89
Member Avatar for bodomchild

Hey there, I'm kinda new to Programing and I'm still learning the basics, I have Borland C++ 5.5 program and I need to write the following program in it, any help about it would be very appreciated, please reply ASAP :) The Program is the following: [B]Write a program to …

Member Avatar for bodomchild
0
141
Member Avatar for iichi07

This another project and it is called Complex Class. Create a class called Complex for performing arithmetic with complex numbers. Y=Use double variables to represent the private data of the class. Provide a constructor that enables an object if this class to be initialized when it is declared. The constructor …

Member Avatar for iichi07
0
264

The End.