General C++ Programming - November 2013 (Page 11)

Question
 
I really don't have a clue how to carry out this.. could some1 please write the program that I could see to understand what mut be written. thankyou. questio...
[4 replies] Last: thank you all.. what you guys said was extremely helpful!* (by abriella1)
Writing to a single file from two files.
 
I created a simple program that writes some text to two different text files. Could someone show me how to create a program that would retrieve the information ...
[3 replies] Last: If you did not understand a lot from the tutorial I am not quite sure ... (by snowright)
round
 
HEllo how to round double as below; 123,0000000000012 to 123,0000000000000
[1 reply] : Rounding methods: http://www.cplusplus.com/forum/articles/3638/#msg155... (by Duthomhas)
Recursive Bubble Sort Question
 
Is this an acceptable recursive bubble sort? <3 template<typename T> void recursiveBubble(T * arr, int size){ if (bubbleSortAux(arr, size)) return; else ...
[3 replies] Last: You cannot always choose your container. Bubble sort is an excellent c... (by Duthomhas)
Help with making a sorting function
 
#include<iostream> #include<fstream> #include<iomanip> #include<stdio.h> #include<stdlib.h> #include<cstring> using namespace std; void Sorting(); int ...
[6 replies] Last: I don't know. So why is it you are being so rude then? You asked for... (by Duthomhas)
by Ala888
Microsoft Code for Keyboard Input interpretation
 
Hello, at the moment my program is extracting keyboard data through accessing the virtual key states. However, it is not performing as I intended because the da...
[2 replies] Last: #include <stdio.h> #include <limits.h> #include <stdlib.h> #include... (by Ala888)
I need help please! This lab is due at midnight
 
I was absent when our instructor taught us how to do the second part of this assignment, and I am completely lost. It is due tonight at midnight, if someone co...
[5 replies] Last: It doesn't? I read this discussion as "read the two files and concate... (by cire)
Undefined reference to a function. (Using Code::Blocks if that helps anything)
 
Long story short, I'm making a program that's essentially a Text-Based Fire Emblem game; it runs calculations and rolls dice and has all sorts of Goodies. Howev...
[2 replies] Last: http://www.cplusplus.com/forum/general/113904/ If you chose `2)' make ... (by ne555)
Stack Problems
 
My num array is corrupted, can't figure out while. #include <iostream> #include <iomanip> #include <fstream> using namespace std; void openfiles(ifstream& in...
[2 replies] Last: Yeah not sure why I threw a 5 in there, thanks for having a better eye... (by Tysonw123)
strings in c++
 
i have a string something how should i scanf it? scanf("%s",&something); does not work ofc so how should i do it?
[11 replies] Last: > So would that be scanf("%29s", &foo ); The problem with that is the... (by JLBorges)
I wrote a program 2 determine the type of file. Output i am expecting FF D8 FF E0 but i am getting 0x22fda8
 
#include <fstream> #include<iostream> using namespace std; int main() { char buffer ; ifstream inFile; ifstream inFile ("images.jpg", ios::i...
[4 replies] Last: It is working now and in the process i learned a few things. Thanks fo... (by sammy206)
Writing from two files to a single file
 
I created a simple program that writes some text to two different text files. Could someone show me how to create a program that would retrieve the information ...
[no replies]
Arbitrarily Large Numbers
 
Hi There, I've been going through the project Euler sets with c++, and am on problem 19. However, I ended up switching to python to complete problem 16: 2^15...
[3 replies] Last: Thanks, Duoas! It's not the answer I was hoping for, but TTMath looks ... (by thewitchking15)
passing char array to function
 
In the below program, I am confused about one thing. When the getline function is called, it passes a char array of size 1000 by VALUE. It must have passed by v...
[3 replies] Last: I tried to run this program. First I had to change getline to another ... (by johnmerlino)
Deleting Vector of Pointers (need help)
 
Currently I am implementing the A* algorithm in C++. I have chosen to use a hybrid of a '2D vector grid' and two 1D pointer vectors to specific places in the '2...
[3 replies] Last: If you're not using new to create the sets... then you do not need t... (by Disch)
Smart pointers
 
I don't really see a great reason to learn smart pointers but I think I should know how to use them so at least when I read someone else's code I don't get conf...
[4 replies] Last: Thanks everyone for your answers... (by rmxhaha)
C++ strange program behaviour
 
cout<<(2,3,4,5,1)<<endl; If i type this it just prints the last number... #include<iostream> using namespace std; int work(int x) { return x; } int mai...
[1 reply] : You are abusing the comma operator. http://en.wikipedia.org/wiki/Comma... (by Catfish666)
creating 2d array dynamically
 
Hi. What's wrong with the following code?I get a runtime error int n, m, p; //Used as the dimensions of the arrays cout << "Please enter the number of ro...
[7 replies] Last: For creating matrix a where is n ? Who is p in this stuff?... (by condor)
Writing to a file
 
Hello, I am trying to make a simple program, I would like it to be able to do the following, Write a program that opens two text files (input1.txt and input2.t...
[2 replies] Last: Thank you so much! That was the problem! (by Jake hollcroft)
by mabbia
pacman
 
Hey! I am making pacman game..Every thing has been done.I have created ghosts but unable to move them. Can any on help me in moving ghosts simultaneously? No...
[3 replies] Last: Cool, I made something similar to pacman a year ago, I know SFML befor... (by rmxhaha)
November 2013 Pages: 1... 910111213... 46
  Archived months: [oct2013] [dec2013]

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