- Strength to Increase Rep
- +3
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Re: So my program is coming along, but now I am writing in the range checking to ensure that the inputs are actually what they should be. My code works fine for time, except for the fact that white space gets ignored. I need to ensure that a user cannot input … | |
Re: Hello I have given a program in which i have to declare structure to store account ID, amount, user name and address. It inputs the number of account holders from the user and creat a dynamic array of structures to store the records of accounts. The program should declare two … | |
Re: Let's start with 1 pipe such as ex: "ls | grep hello" What I'm trying to do is to split the *args[] into 2 that one contains "ls" (left-of-the-pipe command) and the other contains "grep hello" (right command) -> so I can execute the child pipe as producer and parent … | |
Re: can somebody help me with this program?? i have to program a matrix with n column and n row and it should be able to find a path moving like a knight in chess game(L) that touch every point of the matrix once. the program consist in enter the location … | |
Re: Right, you're going to think I'm crazy but is Association like "Has is" For example: I have 2 classes, Teacher and Classroom, to create association would be: Teacher has a Classroom? Thanks | |
Re: Or at least I [I]think [/I]that's the issue. Essentially, I am in the process of overloading operators and allowing users to enter data directly into the class objects. I was able to do the first one so I followed the same pattern and I get a segmentation fault when I … | |
Re: How can i sort this array pls.. [CODE]#include<iostream> #include<algorithm> using namespace std; int prompt(int x[]); void printreverse(int x[]); int main() { int x[5]; prompt(x); printreverse(x); system("pause"); return 0; } int prompt(int x[]) { for(int i=0;i<5;i++) { cout <<"Enter integers:"; cin >>x[i]; } } void printreverse(int x[]) { for(int i=0;i<5;i++) { … | |
Re: Can someone help me with this problem I've been trying to do an else statement but it doesn't work here is the code.... for(int c=0;c<student_max;c++){ if(search_id==id[c]){ location=binary_search(id,student_max,search_id); cout<<"Student ID \tTotal \tGrade"<<endl; cout<<"-----------------------------"<<endl; cout<<search_id<<" \t\t"<<total[location]<<" \t"<<determine_grade(total[location])<<endl; //break; } //} else{ cout<<"Incorrect id entered"<<endl; break; } } } | |
Re: Hello what would be the best way to return a pair<> via a structure Let me further explain. Below is the type of struct that I want to use: //compass.h struct Compass { pair<int, int> C; pair<int, int> E; pair<int, int> W; pair<int, int> NE; pair<int, int> NW; pair<int, int> … | |
Re: This program should accept array of integers and integers that indicate the number of elements in the array. the function should then determine the median of the array. Using pointer notation. I did research to see if someone had similar problem like me, but their was only other one, it … | |
Re: I am having trouble writing these recursive functions. I know I am on the right track, but also know that these functions are not right. Any help would be appreciated. Given the following declarations for a linked list: [CODE]struct NodeType; struct NodeType { int info; NodeType* link; }; typedef NodeType* … | |
Re: Can i have some example for "if string is found" I have no idea what syntax for this. compare, find or seek or what else i don't know? | |
Re: Hello, I have a question, when does a global variable get destructed? ex. [code=c++]#include <iostream> using namespace std; class simple { public: int *i; simple(int ni){ i = new int(ni); } ~simple(){ delete i; } } simple simple1(10); //for simplicity no command line int main(){ cout<<*(simple.i) } [/code] when will … | |
Re: Hello, I've written couple of overloaded operators in my file containing Set declarations. I want to use these operators within the declaration file. However it seems it isn't used. Instead it uses the standard operators. e.g. i have two overloaded operators say <= and == [code=cpp] bool Set::operator<=(const Set& b) … | |
Re: To remove duplicates from a vector, my first thought was to insert them all into a set, it would take care of the uniqueness of the elements, and then read them back out into my vector. However, I have a vector<Point>, where Point is a point in 3d space (ie. … | |
Re: This is a part of the problem in my homework. I have : int alpha[20]; int beta[20]; int inStock[10][4]; I need to write a function copyAlphaBeta that stores alpha into the first five rows of inStock and beta into the last five rows of inStock. my program is here, but … | |
Re: Hi All, Could you kindly help me regarding the usage of array of pointer (1dimension or 2), I mean where we can use it. Regards, IDB | |
Re: Hi, I'm writing a C++ single-threaded Unix daemon that listens for data arriving at a port. The whole application logic is contained into an infinity loop. The problem is that the daemon consumes a lot of CPU cycles, specifically because the loop is being continuously executed. I’ve looking around for … |