General C++ Programming - March 2015 (Page 5)

need help
 
This is my code for the rainfall array.. // Arrays Lab.cpp : Defines the entry point for the console application. /* Rainfall Write a RainFall program tha...
[1 reply] : The problem is that you sort the array before calculating the highest ... (by Peter87)
gg
 
thank
[1 reply] : http://lmgtfy.com/?q=game+of+life+c%2B%2B (by TarikNeaj)
a method use while() difficult to understand
 
hi ! my friend . one beautiful day , i was met a part of code that i cant understand that is : # include<....> // pre-precess ..... void main () {...
[4 replies] Last: hiihih thank you very much!!! i love all (by chauvoluuhuong)
Interesting Exercise. (c++)
 
Planet's radius is "R". Also, 2 satellites were located(longitude and latitude) another places. How can find distance between 2 satellites? Example:...
[3 replies] Last: http://lmgtfy.com/?q=sphere+distance (by MiiNiPaa)
How to display a string per line (fstream)
 
How can i display a string per line on the .txt i made? There are 2 .txt files, the one has: John Finn Xach The other is: password1 password2 password3 Ques...
[9 replies] Last: Still need help D: (by Zanmato)
I want to create .h file to loop a program
 
Hello, What I want to create is a file that I can Include in programs I create in the future. The purpose of the program is to be a function that with minimal ...
[1 reply] : If you want to loop your program just create a driver function for you... (by E l e c t r i c)
WTF is going on here on a lower level?
 
const int& x = 3; Simple one liner, but am a bit confused. Doesn't a const& store the address of an lvalue. So why does it work with rvalues.
[8 replies] Last: This is what the standard specifies: const int& x = 3; When this c... (by JLBorges)
1 semester of Training, can I incorporate songs into my program?
 
I know all the basics of C++ but I although I don't understand the complex stuff, I want to learn. See, I'm making a study tool for me and my roommate to st...
[2 replies] Last: Don't reinvent the wheel. Find a library that does what you want and u... (by LB)
ListaCRC2
 
#include <string.h> #include <iostream> using namespace std; #include "contenedor.h" #include "barco.h" int main(){ int cant,cont1,cont2; barco b=barco...
[1 reply] : Dont Double Post. (by TarikNeaj)
ListaCRC
 
class Lista{ private: Nodo* inicio; public: //Constructor Lista(){ inicio= NULL; } void agregarInicio(int valor, string nombre){ //crear nod...
[1 reply] : First of all, you are a software developer so please try to code in en... (by Gamer2015)
If the user enters the memory key (“m”), your calculator should display the last value or operator stored in memory.
 
private: System::Void One_Click(System::Object^ sender, System::EventArgs^ e) { if(endProcess) Display->Text = "0"; if(Display->Text...
[5 replies] Last: You can start by doing what I told you to do. (by TarikNeaj)
I/O from a text file
 
Im getting some crazy error messages.I have to use the data from the text file to calculate the avg mpg from each car. When I run the program I get 77 errors un...
[1 reply] : 1) You are trying to manipulate closed file 2) You are trying to write... (by MiiNiPaa)
I need some help
 
I would like to create 250 vectors using a for{} loop, having the name changing by i.Exemple i want to calle it v'i'. So if i goes from 0 to 3, i should have v0...
[7 replies] Last: Well, there is always the range-based assignment: http://www.cplusplus... (by keskiverto)
assembly language C++
 
Im just stuck on these 2. I know I am overthinking them. Write an assembly language program that corresponds to the following C++ program: #include <iost...
[6 replies] Last: In case OP still doesn't get the hints: http://en.wikipedia.org/wiki/... (by Smac89)
by Dkob1
Frequency?
 
It is not outputting the lowest and largest frequency part correctly. How do I fix the part at the end? I tried doing it without if statements but got errors. ...
[5 replies] Last: Ok, thanks. I think I got it now. (by Dkob1)
My loop is not saving lines in text file. HELP.
 
int sec; sec = 60; int min; min=59; int hour; hour = time-1; while(true){ Sleep(1000); sec = sec-1; if(sec==0){ min=min-1; s...
[9 replies] Last: for example. If you change the loop to this int counter = 0; while(c... (by TarikNeaj)
Class member: When to declare pvt and public
 
Please explain to me with least ambiguity when is a class member should be declared public and when private?
[4 replies] Last: Structure whose only purpose is to group some values together. It has ... (by MiiNiPaa)
Compile but not Execute
 
Geany does not indicate any errors. It compiles successfully, but does not execute. #include <fstream> #include <iostream> #include <iomanip> #...
[1 reply] : What if myfile was not open correctly? Also: while (myfile) . If my... (by MiiNiPaa)
do something while input isn't 5..
 
I want to keep looping in a while loop until the user presses the value 5, but the function cin shouldn't block the while loop... ex: int t; do { custom_fu...
[4 replies] Last: ^^exactly something i was thinking.. but just having a hard time findi... (by DrJones)
by Mrkey
How to merge c++ code into Visual C++ studio project?
 
I have created Win32 Application project in Visual C++ 2010 and I want to add C++ Program to display the word "Hello World" on the screen. I have read many For...
[13 replies] Last: How are you trying to display the text? (by admkrk)
March 2015 Pages: 1... 34567... 28
  Archived months: [feb2015] [apr2015]

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