49,761 Topics
| |
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 … | |
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 … | |
| 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 … |
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}, … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
| 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 … |
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 … | |
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 … | |
[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 … | |
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] >> … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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) … | |
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... | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
hey ppl.pls give me std codes of java applications lik applets,login form,poll results....etc...... | |
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++ |
The End.