General C++ Programming - June 2012 (Page 9)

Math problem
 
Hi, im doing a calculator that calculate area and circuit of forms. But at the math part i get the wrong anwser. What am i doing wrong? if (form_2 == 1) ...
[3 replies] Last: Thanks :D (by jsheuirjfjekk)
by nimLee
Can u help me to do this pls
 
Decoding steps. 1. Discard the "0E" from the beginning of the string and if there is a 0(zero)at the end of the string discard that as well. 2. Reverse the...
[3 replies] Last: Are u using string or char*? in case of char*: void reverse()... (by SirSmilesaLot)
by abcabc
not able to find the errors in program
 
Please help me to find the errors in the following program. Thank you! // PROJECT HOTEL-MANAGEMENT // INCLUDED HEADER FILES #include"graf.cpp" #in...
[no replies]
Passing Char Array Problem?
 
#include<iostream> #include<cstring> #include<stdio.h> #include "gpa.h" using namespace std; void gpa::getInput() { cout << "Enter in your grade: "; gets(in...
[2 replies] Last: void gpa::getInput() { cout << "Enter in your grade: "; gets(inp... (by SirSmilesaLot)
by nimLee
if wthout Else
 
if (cgdc_re_match ("^(865|866|867|868|869)$", number1) == CGDC_RE_OK) return TRUE; else if (cgdc_re_match ("^(765|766|767|768|769)$", number2) == CGDC_RE_...
[2 replies] Last: Thank you very much (by nimLee)
by sanu
Reading the contents stored in array and put them in separate arrays..
 
I have the line of "7/10/2008 04:54 PM: 4.2334;3.6547" which I have already stored in an array after reading line by line from the text file,which contains date...
[2 replies] Last: Well you have a delimiting character between each value (first-' ',sec... (by BlackSheep)
std::out_of_range, please look!
 
Hey everyone, I'm programming a game in c++ and i'm currently working on the file loader,but i've run into a bit of a problem. VC++ 2010 express is my IDE. ...
[3 replies] Last: Thanks man, thanks to you I found the problem, In the file format I fo... (by NitroGenius)
creating a get customer name function
 
i'm trying to create a function to have someone input their name in this format: lastname, firstname basically at this point i use a getch() to get each lette...
[1 reply] : Why don't you just read the entire line of input into a std::string ... (by ascii)
Distinct C++ Concepts?
 
I'm currently studying CS in college and I'm planning to learn C++ to make myself more marketable to employers (they don't teach it in my university's curriculu...
[1 reply] : Not really. Though C++ does do a few things interestingly. First on y... (by Duthomhas)
If/Else Statements
 
I'm having so much trouble with this assignment. I need to create a program that asks the user to enter the number of minutes they were parked in a parking gar...
[1 reply] : IF (NumberOfMins<=0) The keyword in C++ is if , like this if (Numb... (by Moschops)
by Hmelo1
Program Not Reading Previous Words
 
I'm attempting to make a program that reads the number of lines, words, characters, unique words and unique characters. So far I've gotten everything correct ex...
[no replies]
How do I use a variable within a string?
 
Okay my problem is that I want to run a for loop that multiples the variable in the for loop by a number but that part of my code has to be within a string for ...
[4 replies] Last: I think your question is "How do I build a string out of a string and ... (by Moschops)
by dwjang
memory allocation for auto variables in a loop
 
Hi, I have the following simple program which prints out the address of a local variable inside loop. I assume the address of that variable changes by iterat...
[3 replies] Last: I thought it is not necessarilly be same all the time. No one says i... (by Athar)
Creating a Queue as a Dynamic Array
 
#include <iostream> using namespace std; void addElem(int num); void delElem(); int num; int main() { char ans; cout << "Begin Queue Opera...
[2 replies] Last: Oh, okay thanks. (by Daniel Rodriguez)
how do you debug this?
 
I cant make it run properly..it should read words if the inputted words are palindromes..but it always comes out not a palindrome help #include <cstdlib> #i...
[2 replies] Last: #include <iostream> #include <string> #include <algorithm> using nam... (by viliml)
How can I make this program where..
 
Write a simple encryption program using string functions which apply the substitution method. Explain the program by parts. Here is the given substitution table...
[8 replies] Last: #include <iostream> #include <sstream> using namespace std; st... (by LimeOats)
compiler says var is not constant?
 
So when I compile this, the compile says that people is not const so I cant use it to set the columns for the 2d array any ideas/thoughts? also, ignore the fil...
[8 replies] Last: Guess I have a lot to learn haha. Thank you again for the help. I will... (by cgleckman)
Pass initializer_list to variadic template
 
I'm trying to pass an initializer_list to a variadic template but it doesn't work. #include <initializer_list> template <class... Args> void foo(std::initializ...
[2 replies] Last: The "{}-syntax" is not an expression, it cannot be used to deduce the ... (by Cubbi)
Utilizing GPU for more processing power
 
Simple question, tough answer. I want to be able to use my gtx 560 ti's as coprocessors alongside my i7 to process large amounts of information. In my case, I w...
[2 replies] Last: That's all i needed. Thanks! (by JakeIsBoss)
Number Calculations using file I/O, arrays, and strtok
 
Alright, so I have a text file titled 'Input.txt." The text file contains a variable number of lines of information (for the sake of this, lets say 10). I need ...
[1 reply] : I'm attempting to use strtok with for loops and while loops. I'm not ... (by coder777)
June 2012 Pages: 1... 7891011... 33
  Archived months: [may2012] [jul2012]

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