49,761 Topics
| |
Hello again everyone. We have completed a project after a few months and a lot of help but for some reason we are still having problems. The project compiles properly without errors but the results are incorrect. Basically we are using 4 sorting algorithms in order to calculate how much … | |
I have a project where I must use pointers to do a search on some accounts I've built up into a vector. My problem is whenever I try to pass the vector to a pointer I get an error. I've tried many different things but to no avail. Maybe one … | |
I need a little assistance with finding the square roots of each number entered by the user in a array. I'll copy and paste what i have so far in my function, but i get an error when i try to run the program and it would say: sqrt was … | |
I need to insert a control-break in an array after every third line. Can someone help with this? Thanks so much. -R | |
I want to change cursor position in my C++ program. As you know, C++ does not have any command to do this. By I think, one of the h files can be used for this purpose. My Bloodshed compiler has lots of "*.h" files. But I don't know how to … | |
I want to write a program.This program is following: The two text file named file1and file2 each hold number of English sentences.A c++ program is required to carry out the following operations. a.)Give a wrod ,it lists how many times that word appears in file1 and file2. b.)list all the … | |
Hi Guys, Kindly help me Solve this. I have already worked on the classes that were inherited and attached after the question is the main part of my program. I have bolded the part in the question below where I need help. Thank you so much. The question is: Make … | |
ok, call me stupid, maybe i forgot my math: but if a C++ program spits out this: -bash-2.05b$ g++ markoff.cpp -bash-2.05b$ ./a.out x = 1 y = 1 z = 2 x = 1 y = 2 z = 5 x = 2 y = 5 z = 29 x … | |
I am a complete newbie in C++ programming. After a very basic introductory class I am now reading a little more advanced book and trying to teach myself and I am slowly learning. Anyway, the book mentions a method for calculating the cube root of a number but it doesn't … | |
I apologize up front; I'm a VB Programmer trying to pick up C++. I have a very simple program that takes a string input from the user. How can I look at a specific character in that string? VB has the Left(), Right(), and Mid() Functions. Is there something similar … | |
i have a vector initialized without a size. vector<int> Vector1; i initialized the first 5 values via .push_back() and i am supposed to do this next: Externally initialize(using a single cin statement) the next four items to: 50 65 77 32760 This doesn't seem to work: cout << "Enter these … | |
Can anyone help me with this snippet of code? I have 2 files, a random record containing random records in it and an index file, which contains the binary tree of the random record. Here is what the index file looks like: 123456720 4 -1 -1 123456708 6 -1 -1 … | |
This program is calculating and displaying the average of 3 groups of numbers in output file. Data is arranged in file so each group of numbers is preceded by number of data items in each group. It works for 2nd & 3rd group but calculation for 1st group is wrong. … | |
Hello, I am studying C++ at Uni and my coding is not very strong. More to the point I am having issues with my header taking in this string. The code works in a linear non object oriented code but as I am new to data abstraction I as mentioned … | |
Hello, I was hoping that someone could help me with this question. We received an extra credit queston which completely bombed on. That wasnt the problem, the problem was that I still cannot explain the questions below and since this was extra credit the professor would not give us the … | |
I got this assignment to do, but i cant so it, i have tried everything i know in C++ programming and its not working. Can someone help me please. Write a Graphical User Interface program that simulates the activities of a vending machine. The program should allow for full user … | |
Well I got the password code right, I think. I have a few problems 1) it wont close properly 2) Can someone point me in the right direction to find a tutorial that teach me how to only let the user have 34 tries before it close and also to … | |
So I need to write a program that requires getting data from an input file (first name, last name, Student ID, and 4 test grades) and create an outputfil with the first and last names and ID, and then the average of the grades and the final letter grade - … | |
How can I use "cin" to allow entry of an enum type in C++? My code is as follows: enum Cards {TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE}; Cards hand1 = ACE, hand2 = ACE; cout<<"Player#1 - Pick a card (2 - A): "; … | |
Hi all, I have a C project consisting of five files as follows: main.c file1.c file1.h file2.c file2.h I have defined an array in file [B]file1.h[/B] as follows: [CODE]static struct prnc keys[MAXP];[/CODE] the array was populated in file [B]file1.c[/B] Now I need to use the contents of this array again … | |
Hello ladies and gents, Ive got this example of a program that I tried out wich shows some special possibilities to use new. [code] #include <iostream> using namespace std; int main() { int a[100]= {0}; for (int i = 0; i < 100; ++i) a[i] = 100 * i; int … | |
What's the difference between a set and a map? (As described below on cppreference) Set: The C++ Set is an associative container that contains a sorted set of unique objects. Map: C++ Maps are sorted associative containers that contain unique key/value pairs. I'm having trouble finding the distinction. | |
i am after help with c++ builder any takers i need info on the registry adding and changing keys thanks in aticipation Robert | |
I've got to implement Prolog in C++ for an assignment. I'm very new to C++, it's a little daunting. Also, I have no idea of where to start. Can someone point me to some basic algorithm and/or some resources online? | |
Hi, I've been experimenting with STL on solaris with the 7.0 sun compiler. I am able to write programs using string, map, vector, list, etc. however, I am trying to use hash_map and can't get the most basic (ie hash_map<string,string> h; ) to compile. It appears that hash_map is not … | |
I want to write a program.This program is following: The two text file named file1and file2 each hold number of English sentences.A c++ program is required to carry out the following operations. a.)Give a wrod ,it lists how many times that word appears in file1 and file2. b.)list all the … | |
I am trying to close this file so that it stops reading the array twice. i have placed it in different places but i does not seem to work, please look at my code and advise me on were to place the infile.close() Thanks in advance [code]#include <iostream> #include <fstream> … | |
I kind of know the definition through studying Java.] Inheritance is like when a child class inherits some value, object, or function from a parent class, right? I need an example of how its done in C++ | |
Okay, this is driving me insane... The compiler error I'm getting says I am trying to convert a void to an account? I don't see why it thinks I'm trying to do that... Maybe you guys can help me out. [CODE] void get_accounts(account a[], int n); int add_customer(account a[], int … | |
I need help. I keep getting a Bus Error when I run my program and I've narrowed down where it occurs to the following code fragment. px0c0 and px0c1 are type double pointers and count_x0c0[m] and countc0 are integers. Can anyone see why this code would be giving me a … |
The End.