General C++ Programming - March 2014 (Page 19)

C++ Help
 
Where is mistake on this programs #include <iostream> using namespace std; double sum(int a, int b, int c, int d, int e); { int n,m; double x,y; cout<<...
[14 replies] Last: ok i solve it it was problem with int d i forgote to set i done it (by rmaxhuni)
by lolwe
How to fix these errors
 
string menuNames ; for(int i=0;i<menuAmount;i++) { menuNames =menuNamesAfterParse.substr(0, menuNamesAfterParse.find_first_of...
[1 reply] : The array size need to be a compile time constant. If you want the siz... (by Peter87)
by Dkob1
Numbers to Roman Numerals
 
Write a program that does the following: Asks the user to enter an integer Prints the integer in Roman numerals 1.) Asks the user if they'd like to convert...
[no replies]
calculating sum of numbers between two user inputs
 
Came across this question and am finding it difficult to imagine how the program would work. I cant figure out how to calculate the values between numbers that ...
[2 replies] Last: sum (a -> b) return ((b * -~b) >> 1) - ((a * -~a) >> 1) (by Smac89)
Solved
 
***
[3 replies] Last: line 72 is doing an assignment, not a comparison EDIT: Ugh... I real... (by Disch)
all real numbers
 
int number, sum = 0, counter = 0, avg = 0, p1, p2max = -1000000, p2min = 10000000; inputFile.open("random1.txt"); if (inputFile) { while (inputFi...
[6 replies] Last: got my answer, thanks for the help. if (counter == 0) p2min = p2ma... (by bloodvenom)
Class - public
 
Can somebody explain me what does "public mesh" in the code I attach mean? I understand that if the class is called FVM, the constructor must be named FVM, so I...
[3 replies] Last: Thanks Zhuge and residentBiscuit (by ryllprous)
Beginner Help
 
I am practicing with functions and I made a simple calculator that calculates addition,subtraction,multiplication and division. When I tried to output the resul...
[3 replies] Last: Also as you're a Begginer you mite not know this But never use namesp... (by Mizfizz)
by ljbeng
Display Negative Number
 
I am getting strings from an HTTP request that will have hex values and I must convert those strings to a signed decimal. //typical string inside response: /...
[7 replies] Last: got it. unsigned int and strtoul fixed it. (by ljbeng)
Array corruption error
 
Hey guys, I finished my project and it does work, but every time I hit enter to end the program I get an error that says my variable array is corrupted. here...
[6 replies] Last: At the moment I have to go to another hour in class, so I will reply i... (by VincentOrfeo)
Math induction with c++
 
Hi, I am working on a program for a school assignment. I am not sure exactly how to code this at all. If anyone could help, that would be very much appreciated....
[1 reply] : here you've got an example of how to measure time http://www.cplusplus... (by ne555)
invalid conversion?
 
This is my program: #include <iostream> using namespace std; class Point { private: int x, y; public: Point(int f = 0, int g = 0) { x ...
[3 replies] Last: Omitting the 'new' before each of the calls to the Point(int, int) con... (by ath2441)
by Dk71
Help please!
 
Hi guys, When i create classes they work perfectly when the class definition is in main.cpp. But when i try make classes with the header and source files sep...
[2 replies] Last: use command: g++ main.cpp example.cpp -o test_example replace here mai... (by interester)
Hashing...how does it work?
 
So I have this problem and the input need to look like this ID Name 26145 RADY 3437 FRANZ and the output like this Key Name 33 RADY 365 FRANZ I am really ...
[9 replies] Last: never mind got it thanks everyone (by whoovian11)
erase mutliple values in a vector
 
hello i wud like to delete multiple values from a vector using indexes as my values r not fixed they may change so using indexes i want to delete for exam...
[6 replies] Last: NT3's solution is correct for the example data. Adaptation for generi... (by keskiverto)
by bioit
i+1 index of int's vector
 
Hello I've big problem with my vector... I'd like to get the value from it, but not i index but i+1 index. Compilator shows this: 'lvalue required as left opera...
[2 replies] Last: M1[i+1].time instead of M1[i+1].Time() solved ;> (by bioit)
Logging Method Formats
 
I am creating a logging namespace for a game that I am creating. The logging includes a file, and it would contain the following methods: OUT::log(?) OUT::warn...
[7 replies] Last: Thanks, the -std=c++11 worked. I remember reading that somewhere, just... (by ZachAttack4NDP)
Prime number between two values
 
I wrote this program to print prime numbers between 2 and 10 but it only prints '3'. how can I fix this?? here is the code #include<iostream> #include<...
[6 replies] Last: Every number has 2 devisors (1 and itself), so by your definition eve... (by Mats)
by nvrmnd
how do i compile a wxWidget App ?
 
I've finished building wxWidget using gcc, but now idk what to do next.. I tried following this one : http://stackoverflow.com/questions/15713244/compiling-...
[3 replies] Last: to redirect ? (there is no makefile in the directory, just makefile... (by nvrmnd)
should i learn GUI?
 
hi, i wanted to learn GUI but my firend said when you become a programmer you will design core of Program and then someone else other programmers will design...
[4 replies] Last: Thanks, but now i have some more questions : How should i know if im g... (by kam hagh)
March 2014 Pages: 1... 1718192021... 36
  Archived months: [feb2014] [apr2014]

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