Beginners - December 2016 (Page 12)

Exchange the values of variables. To swap values
 
How would an example look like to solve this pseudocode? IF(tmpName2 < tmpName1) Change place on tmpName1 and tmpName2 Change place on name1 and n...
[1 reply] : Your terminology is odd. Perhaps you would like to exchange the values... (by keskiverto)
Problem in fileheadling
 
How To Get Error message when no user is found not vector etc... #include<iostream> #include<string> #include<fstream> #include<stdlib.h> using name...
[1 reply] : You set the flag = true as an else statement. Consider how your progr... (by MistahMoose)
Please help
 
How to flip bits of a number in C++? for ex: 5->101 should become 010 which is 2
[1 reply] : Use the XOR bitwise operator (^). http://www.cplusplus.com/doc/boolean... (by AbstractionAnon)
Help with binary serch!!
 
Hey, I've been asked to write a program with various family members that I would then sort of order. I have succeeded with the program, but now I have to suppl...
[1 reply] : the pseudo code for binary serch is like this: IF middle value of th... (by kinglado)
by Moshi
Turbo C++ Login Program
 
I made a login program on CppDroid then tried to reconstruct it for turbo c++ 3.2 use, well, i failed. So can someone give me hints on getting this right. H...
[5 replies] Last: Thanks for the answers and references, really helped me understand str... (by Moshi)
Solving a simple problem
 
Dear all, I have a little problem in C++. My objective is the next: I have to count frames (OpenCV), and detect a certain amount of objects, through a ve...
[no replies]
multiset (1,2)
 
hello guys, how can i find how many times appears multisets each elements?
[20 replies] Last: #kemort - my real problem is that when i input the number sequence i ... (by closed account 48T7M4Gy)
by sk9294
passing ofstream reference
 
i am trying to write a program that finds files in a folder recursively but i am not sure how to pass ofstream reference when i am running my program it runs su...
[15 replies] Last: A slight variation. Essentially the same code as before, but with two ... (by Chervil)
Trouble saving a string to a file
 
1. Read the provided plain.txt file one line at a time. Because this file has spaces, use getline (see section 3.8). 2. Change each character of the string by...
[2 replies] Last: The order in which things are sequenced is incorrect. Instead of this:... (by Chervil)
by Hengry
Help with erase function in unordered_map
 
I just started learning about unordered_map, and from my understanding, it erases the key and the value based on the key. My question would be how I would able ...
[4 replies] Last: I haven't tested my code as of now, but I'm just trying to figure out ... (by Hengry)
SFML Error with vertexArray
 
I was wanting to make a 3d Terrain generator, but when I compiled the code below, it just crashed. I'm using CodeBlocks(MINGW) and SFML 2.1; #include <io...
[1 reply] : C++ does not implicitly set declared raw types to 0. If you just say,... (by Ganado)
DVD Collection Program
 
Hello everyone. I'm working on a program that maintains a collection of DVDs. I will post the specifications below, and then the code and errors on the followin...
[9 replies] Last: try: collection.insert(make_pair(title, myDVD)); (by gunnerfunner)
Undefined Symbol "true"
 
Hello everyone. Please, give me a hand. There's an error message which says "Undefined symbol "true" "(line 26) //-------------------------------------------...
[6 replies] Last: I realize that and don't disagree, but me searching for "#pragma argsu... (by Ganado)
HOW DO I ROUND THE OUTPUT?
 
while(!fin.eof()) { for(int n=0;n<43;n++) { tempo.statename =temp.name; tempo.admission =temp.order; tempo.density =temp.population...
[3 replies] Last: Then you use this : tempo.density = round(temp.population / floor(t... (by Kabane)
C++ - program which verifies if a number is prime
 
Okay so my program has to verify if a number is prime, and that number is formed by the number of units of another numbers. Example: for n=4 and numbers 237 23...
[1 reply] : line 13: cin >> x ; // for example x = 1; while( x ... (by ar2007)
A basic program doesn't compile
 
To everybody that will read this, On an AppStore compiler I typed this basic program, 1# include<iostream> 2 int main() 3 { 4 std::cout<<"hi there!"...
[5 replies] Last: No, I use the free version, although I am contemplating purchasing the... (by lastchance)
Key Press Detection
 
I am new to programming. And i am learning through tutorials and making little programs myself.But i've faced a problem.I am using Code::Blocks to program in C+...
[18 replies] Last: Thanks ! (by Xrey274)
Minesweeper
 
my code is not working correctly and i need help writing int main. Any help is appreciated.
[2 replies] Last: Line 34,35,37,38: Why are you taking % 12? You're board is only 8x8.... (by AbstractionAnon)
CAN YOU FIND THE ERRORS?
 
Write your answer here. int hailstonelength(int n) { int length = 0; while (n >= 1) { length++; if (n % 2 == 0) n = n / 2; if (n % 2 == 1) n =...
[1 reply] : #include <iostream> // <=== add using namespace std; // ... (by lastchance)
while
 
hi. I am a bit confuse about the while function. for fstream, input files what does this mean? ifstream input; int x; while(input >> x) { //stat...
[3 replies] Last: thanks for replying ^^ (by weirdo123)
December 2016 Pages: 1... 1011121314... 28
  Archived months: [nov2016] [jan2017]

This is an archived page. To post a new message, go to the current page.