49,761 Topics

Member Avatar for
Member Avatar for veroniclake

Hi All, I am facing a serious problem. I need help! There are cases for QueryInterface method in MSDN one amoung them is, a call to QueryInterface for a pointer to a specified interface succeeds the first time, it must succeed again, and if it fails the first time, it …

Member Avatar for Frederick2
0
117
Member Avatar for hgftechhead

Hi All, I have an assignment that asks : Write a program that prompts the user for test scores (doubles). The user enters -1 to stop the entry. After all of the test scores have been entered, calculate the average, the highest and the lowest test score. Use the code …

Member Avatar for jomanlk
0
133
Member Avatar for simonsayz27

I'm writing a program that builds a graph and detects articulation points. I'm stuck with the root vertex and how to find out if it is an articulation point. By definition it is iff it has more than one child but for example: [CODE] 0---1 |\ | | \| 2---3 …

0
51
Member Avatar for vinochick

I have most of the program written, but I'm stuck on the 2 dimensional array. Here is the code I have so far: [CODE]#include <iostream> using namespace std; //function prototype int calcTotal(); int main() { //declare variable and array int total = 0; int sales[6][2] = {{12000, 10000}, {45000, 56000}, …

Member Avatar for vinochick
0
112
Member Avatar for xcorpionxting

I'm working on a small C++ project that requires using classes. I'm supposed to create a super class Animal and the sub classes Fish, Bird and Insect. In the main function, the object of type animal is created. I need that object to 'become' one of the 3 other types …

Member Avatar for xcorpionxting
0
200
Member Avatar for Kirielson

Hello, I've checked a recent Game of Life thread and unfortunately it did not address my problem. I'm trying to manipulate life based on how many cells have life. I'm assuming that it's the way that I'm doing the counting that is messing up the problem but it could also …

0
68
Member Avatar for soapyillusion

Hey everyone, I'm new on the forums and I'm also quite new still too C++ programming I'm taking a course in it in college (to meet my requirements) Its not my major and I'm terrible at math to boot. I have an assignment where the professor wants us to make …

Member Avatar for soapyillusion
0
140
Member Avatar for mitchstokes225

This is what is asked of me. "Create a flowchart and write a complete C++ program that declares a 2 dimensional integer array of size 10 rows and 10 columns. The program should use two nested for loops to fill the array with the even numbers beginning with 2 in …

Member Avatar for mitchstokes225
0
1K
Member Avatar for vinsbg

Hi, I have some problems with this code.I must make a add person.delete person or search... I make everything but if i add someone who is added before the program is crash.. Can someone to put new element on the exact place... for example if i have 1 and 10...i …

Member Avatar for vinsbg
0
98
Member Avatar for simonsayz27

Hey everyone. I'm getting REALLY frustrated with this program and I've been working on this problem for too long now. I am building an undirected and unweighted bi-connected graph class which detects all the articulation points. I am able to detect all the articulation points but I cannot figure out …

0
63
Member Avatar for T-Dogg3030

Hello, part of my project I'm working on needs to have me count the amount of letters in a file. This is what I have so far. Any one help? [CODE] #include <iostream> #include <fstream> using namespace std; int main () { char c ; // start with a blank …

Member Avatar for T-Dogg3030
0
92
Member Avatar for sexyzebra19

My code compiles and is working correctly, but I was just wondering if anyone could check over it and suggest any improvements or correct things I've done that are bad in the c++ world...anything at all? Thanks in advance! [code=php] #include<iostream> #include<vector> #include<cmath> #include<iomanip> using namespace std; //Declare functions void …

Member Avatar for mrnutty
0
94
Member Avatar for confusedndazed

[B]Hello everyone!!![/B] I have the following pseudocode and I'm not exactly sure how/where to plug it into my code. I am still very lost concerning programing so please bear with my ignorance...:) /* pseudocode for Binomial Coefficients */ int binomial(int n, int k) { If (n < k) Then return …

Member Avatar for confusedndazed
0
94
Member Avatar for DawnOfIkaros

Could someone help me with this? [CODE] ifstream readfromfile("stats.txt"); readfromfile >> lvl >> xp >> str >> spd >> acc >> hp >> endl >> inventory[0] >> endl >> inventory[1] >> endl >> inventory[2] >> endl >> inventory[3] >> endl >> inventory[4] >> endl >> inventory[5] >> endl >>inventory[6] >> …

Member Avatar for programmersbook
0
242
Member Avatar for solitaryy

I have a vector filled with names such as John Doe Jane Doa etc. I need to write a function which deletes what is input via the user [CODE]void delete(vector<string>&name) { string FName, LName; cout<<"Enter first name and last name to be deleted"; cin>>FName>>LName; }[/CODE] ie input: John Doe and …

Member Avatar for solitaryy
0
273
Member Avatar for guccitan88

I'm sure I'm missing something simple, but would like to ask if someone could set me on the right path. We have to write a program that requests the hours worked in a week, and a pay-rate, and then prints the gross earnings, taxes and the net pay. [CODE] #include …

Member Avatar for guccitan88
0
164
Member Avatar for Compton11

I'm working on a project implementing Dijkstra's Algorithm. The project involves reading from an input file and the format of the file is as follows: - The first line of the file tells the number of total vertices and the number of edges (n, m) respectively. - The rest of …

Member Avatar for sireeshakiran
0
718
Member Avatar for avitar

Hey, I'm kinda a real newbie. I know just the basics. Can anybody help me with an include file or a command, I don't know something like: [CODE]system("output C:\Windows\picture.bmp")[/CODE] or even: [CODE]#include <help.h> int main(){ image C:\\Windows\\picture.bmp; system("pause"); } [/CODE] anybody know how to help? I'm really good at reverse …

Member Avatar for Narue
0
76
Member Avatar for HITMANOF44th

i am new to c++ so please dont throw any crazy words around :D im using dev C++ form bloodshed as my editor / compiler what i am trying to do is when a user hits one of the special buttons all keyboard input after that will be reformated depending …

Member Avatar for HITMANOF44th
0
111
Member Avatar for gehring

Hi, I am using VC++ 6.0. When i clear a vector using vector.clear() the capacity is not being reduced to zero. Hence the memory is not being deallocated. I have tried to reduce the reserved size by use of vector.clear() followed by vector.reserve(0). This however has no effect. I have …

Member Avatar for gehring
0
328
Member Avatar for BrownBearForU

Hey you guys i have a major problem here basically im a begginer c++ program student and i am trying to get use to vectors and functions so i made this program like a mad lib game or a bear hunt as you say. The program basically have vectors (duh) …

Member Avatar for BrownBearForU
0
165
Member Avatar for kavourdoukos

I am a newbie and i am trying to sort an array of strings that i created using a vector<string> array by opening a file.Thx in advance...

Member Avatar for jonsca
0
65
Member Avatar for gehring

Hi All, I am trying to create a 2D array of the [B]"CString" MFC class,[/B] however it needs to be declared dynamically for my application. I have read up on numerous forums but I just cant seem to find what I am looking for. From what I have read the …

Member Avatar for Narue
0
793
Member Avatar for norbert90

1)Write a C++ program that prints a capital C of Stars. The user should be allowed to enter the width, the height and the thickness of the shape. 2)Write a C++ program that reads positive integers and calculates and prints the number of odd and even digits in each.The program …

Member Avatar for Sodabread
-1
72
Member Avatar for Thraxus

Hello everyone, First, please excuse the sloppy-ish coding. I'm working on my ability to shorten my code as we speak. However, being new to this, the hardest way seems to be what I always end up doing. That said - on to my problem. I wrote this code for a …

Member Avatar for Nick Evan
0
164
Member Avatar for kelton52

Hi, I'm interested in measuring a specific point in time down to the nanosecond using c++ in windows. Is this possible? If it isn't, is it possible to get the specific time in microseconds at least? thanks

Member Avatar for jonsca
0
123
Member Avatar for rciprogrammer

I am trying to create a dll project using VS2005 (C++.NET). It is going to be used to access a database to store records w/o having to know how to actually create records (i.e. just pass info, and the dll classes will create a row in db). I want to …

Member Avatar for yavorski
0
262
Member Avatar for scott6480

I am writing a program that will compare stings of data (true false answers) against an answer key which is another string. for example, the data for the students answers looks like this. tfttftttf so question 1 is true question 2 is false etc. Here is the code I have …

Member Avatar for mrnutty
0
149
Member Avatar for sriram0617

hey ppl.pls give me std codes of java applications lik applets,login form,poll results....etc......

Member Avatar for jbennet
-2
48
Member Avatar for bappee11

hey guys i,m having a bit problem with the programming..... i have to implement semaphore with two function called wait() and signal() using the linked list and array or stack in c++

0
53

The End.