- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
Hi, I have to create a set of structs but i don't know how because it needs to check the equality between them. For example: [CODE] struct something{ int x,y; string word; }; set<something> s; [/CODE] Can you help me? |
|
Hi, I am trying to write a program that will read an integer as a string and it will add 1 to this integer. For example if it read 234, it will return 235. My attempt is this: [CODE] #include <fstream> #include <string> using namespace std; void addone(string& num){ int … |
|
Hi, how can i save the text from a file in a 2d array? For example the file will be like: ebjevjhb tgbvtrjk trjgbj tgrrktgtr kgtrl tkltrg t feg ergfern gn sdcx xssw And i want to save this in a char 2d array like: char str[3][100] so str[0]="ebjevjhb tgbvtrjk … |
|
This is a small program that is suppose to find out the sum of even numbers entered into an array.... but everything works fine without errors but the output am getting is a negative number.... -1717986920. [CODE]#include <iostream.h> void main() { int sum=0; int i, a[6]; int range; cout<<"Enter a … |
|
Hi, I want to make a global 2D array ( i mean outside of the main function), so it will be available from all the functions. But my problem is how can i read it's size from the keyboard? If anyone know, plz help me. Thanks in advance. |
|
Hi, i have to sort two arrays in a specific way. I have two parallel arrays A[N] and B[N]. Ι have to sort A in descending order. The changes in A should be happened in B at the same time. If 2 or more items in A is the same, … |
|
Hello, Can you help me to install the gtk library in Dev c++. I have installed it in Linux but i dont know how to install it in Windows. Thanks in advance. |
|
Hello, I have seen many problems that inputs an unknown size of tests and i have to output the result of each test. An example is here: [QUOTE] The Input The input will consist of a series of pairs of integers i and j, one pair of integers per line. … |
|
Hello, I have seen many problems that deals with big integers. I use C++ and it can handle only some digits. Can you help me on how to represent and use them? |
|
Can i make a function with a vector<int> parameter instead of an int array? |
|
[code=cplusplus] // New2.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <iostream> #include <iomanip> #include <string> using namespace std; void reverse(string& s); int _tmain(int argc, _TCHAR* argv[]) { string st="Word" ; cout<<st<<"\n"; reverse(st); cout<<st<<"\n"; return 0; } void reverse(string& st) { int i; int j … |
|
I am trying to solve an algorithmic problem. First of all the user inputs the coordinates of some nodes. I have to go to the node with the biggest x( let name it E) and then to return to the start that will always be the node (0,0)( let name … |
|
I need to learn brute-force search because i think that it will help me to solve a problem on graphs. Do you know any good tutorial for brute-force search? |
|
I have to make a tree that will have unlimited leafs in each root. I don't have much experience in binary trees and i am confused on how to make this tree. Can you help me please? |
|
Hi, i am trying to make an algorithm that will read the nodes of a graph. Then i should find the shortest path that i have to follow in order to pass from all the nodes. I am trying to make it so the algorithm will calculate every possible path … |