- Upvotes Received
- 4
- Posts with Upvotes
- 3
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re:
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 … |
|
Re:
Hello! I have a question regarding the set up of my binary search. For my program I am working on, I have taken a .txt file full of first names and sent those first names to a string array. The names are then sorted, and from there I ask the … |
|
Re:
Hi, i have to create a algorithm called find2D, to find an element x in an n × n array A. The find2D function iterates over the rows of A, and it calls the algorithm findArray shown below, on each one, until x is found or it has searched all … |
|
Re:
Hey everyone,,, I am new to c++ and to reading from files especially... I wrote a code where I am filling an array of strings with strings from a file and there is an error that happen during the run of the program, please have a look at the reading … |
|
Re:
hello members...........i need a help from someone to give me an idea of how can i write a code for cryptex i have an assignment and i couldn't figure out how to start writing a code i just need an idea of how the program will work in order to … |
|
Re:
for weeks its working fine but this time i dont know what happened after i tried to use hibernate to insert data in my database and decide to delete hibernate and use my old sql query my table model become messy if i insert a 1 row data its fine … |
|
Re:
Hello, I need help with this problem I came across. What I have is this: [code] char answers[5][4] = {{'1','2','3','4'},{'10','0','3','0'},{'1','0','0','0'},{'1','2','3','4'},{'1','0','0','4'}}; [/code] However, this code does [B]not[/B] accept 2 digits..only one. This irks me, and I was wondering if there was a way to add 2 digits. [COLOR="Red"]Note: I am going … |
|
Re:
hi, the following program has got to take a user inputted string and allows the user to see the postion of each character in the array i.e. T H I S I S A T E S T 0 1 2 3 4 5 6 7 8 9 10 11 … |
|
Re:
hi....i am writing a code which reads the contents of file....it has first name, lastname and phone number.....now i want ot read all the first names into one array second into another and phone numbers into third array....i tried but i could read only line by line.....please help out...my code … |
|
Re:
Hello everyone: I am a C++ newbie. I aim to use C++ in my work on coupled fluid flow-chemical reaction problems. I would very much appreciate some help to get me on the right track! I apologize in advance for what is probably a very simple question. My goal is … |
|
Re:
i have no clue how to sort using the array. it is not 2d. this is what i have [code] for(int i=1; i <=num; i++) { do{ cout <<"enter score " << i << ": "; cin >> scores[i]; if((scores[i] <= 0)||(scores[i] >=100)) cout << "invalid score\n"; }while((scores[i] <= 0)||(scores[i] … |
|
Re:
Hey guys, I was wondering how I'd go about returning a "list" of strings inside a member function. I'm assuming an array would have to be created, but I'm not sure...I've tried looking it up but anything with "string" Google'd leads to the string class. Please, I'd really prefer not … |
|
Re:
I am writing a program that can read in statistics from a basketball team. The file lookes like this: Joe 3 114 9-19 1-3 2-4 3 15 4 2 1 2 3 21 I have created an array of structs to read all of them in I used ifsteam infile2("file.txt") … |
|
Re:
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}, … |
|
Re:
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 … |
|
Re:
I keep getting these errors. I'm so lost please help... fairly new to c++ programming. hashheader.h(8) : error C2144: syntax error : 'int' should be preceded by ';' hashheader.h(8) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int hashheader.h(14) : error C2061: syntax error … |
|
Re:
I have 2 main if statements inside this for loop (lines 7 and 56). I'm trying to get so that if after all the iterations are complete, i.e. j = 51 the first and second if statements are not satisfied, then it will print out an error message. I have … |
|
Re:
Hi, I have created a generic linked list in which different objects can be added to a list as long as they inherit from my object class. My problem is this: I am able to add nodes and find nodes etc. but I can't figure out how to return an … |
|
Re:
why is only my first class working? when i run this it just asks about the viruses and not the cost of the OS. [CODE]#include <iostream> using namespace std; class OperatingSystem { private: float cost; public: OperatingSystem() : cost(0) {} float getCost() { return cost; } void setCost(float cost) { … |
|
Re:
Hello, i have one question for reading from file. I get data from file ulaz.txt and i want to data in there would be stored like [CODE]some text;1934 text 2;2342[/CODE] for now its stored like [CODE]sometext 1934 text2 2342[/CODE] so i want to be able to use space between text … |