General C++ Programming - October 2013 (Page 36)

Compiled Function in a file
 
Today I am given an assignment to find the zeroes of a function using Newton-Raphson method. Till now, the input I gave to a program was data. But now the funct...
[3 replies] Last: @rodiongork The assignment doesn't require me to decide the function a... (by eklavya sharma 2)
by Gogu
Elevate an input number without using advanced functions
 
Hello everybody. I am new here and also new in the world of c++. Last night I was trying to see if is possible to multiply one number to another without usin...
[3 replies] Last: this seems to work #include <iostream> using namespace std; int main... (by Yanson)
by KidDes
operator ! for Encoder.
 
So... I am supposed to write a function where the operator "!" will reset the values of the encoder with the statement "!MyEncoder;" for a object "MyEncoder", ...
[2 replies] Last: Thank you! (by KidDes)
by sri248
Can Anyone Help me figure this out?
 
/* PQ2.CPP Programming Quiz #2 */ #include <iostream> #include <string> using namespace std; void printArr( int a , int cnt ); int sumArr( int a ,...
[2 replies] Last: Please don't spam the forums with multiple threads on the same topic. (by MikeyBoy)
unexpected SIGSEG ABORT when working with vector
 
I keep getting a segmentation error when ever I have the following code... int main(void) { //Section 1 unsigned long val = 12; std::vector<unsi...
[10 replies] Last: It's there. Originally I just called it. (by Cheraphy)
Finding size of an array using Try-Catch Blocks Problem
 
Hi Guys I am trying to find the size of an array using a Try-Catch block. As seen on the code, I want the error to be caught when the index is out of range in ...
[6 replies] Last: Wow! Two great explanations. Thank You for your detailed explanation D... (by systempause)
Choosing A Number Between Limits
 
I don't know whats wrong with this code. Im trying to choose a # between 1 and 1000 (can be 1 or 1000), error check it, but keep asking until I get the correct ...
[2 replies] Last: -_____________- Thank you kind soul. (by sciphreak)
Returning Multiple Values
 
I would like to return multiple values from one function to access in different functions. For example: int function1(//what goes here?) { int a ; a = 1 +...
[4 replies] Last: If you have a small number of variables to return, sometimes its just ... (by TwilightSpectre)
Streamlining code
 
Hello. I'm trying to read 4 sets of numbers from a file, sum them, average them and assign them a grade. This is what I have so far and it seems to be working...
[4 replies] Last: @L B You are perfectly right. Thank you! (by condor)
how to cin a class object?
 
If you define a class, for example: class line_t { public: double x1,y1,x2,y2; int segment; }; how to define constructor, so that when I t...
[3 replies] Last: very useful inofrmation, thanks! if I want use a file to input the li... (by northfly)
What after C++ ?
 
I am an intermediate in C++. I mean i know C++ and can write basic programs. I want to make it to the advanced level but before that i want to know what are th...
[4 replies] Last: http://lmgtfy.com/?q=Uses+of+C%2B%2B (by Austin J)
phone games
 
I want to know how to create a game for touch phones using c++ or sfml (2.0)
[11 replies] Last: get xcode for mac and develop on app store (by JasperBraun)
undefined reference to '__gxx_personality_v0'
 
Hello, I am trying to compile a simple Boost C++ program with Clang. The program: #include <boost/filesystem.hpp> int main() { return 0; } ...
[1 reply] : are you on a 64 bit os and using 32 bit libraries or vice versa? (by closed account Dy7SLyTq)
by Snaksa
Task solution
 
Hello! I saw this task today and tought about it for a while (there is short version after it): A bench in the subway has n places, marked with the numbers fr...
[2 replies] Last: What are the time constraints on this? E: If there was more than one... (by Smac89)
Entry point must be defined. (1,2)
 
#include "SDL/SDL.h" #include <iostream> int main(int argc, char *argv ) { SDL_Init(SDL_INIT_EVERYTHING); SDL_Surface* screen; //back thing for the s...
[24 replies] Last: Hey! I tried it after 2 days and now it works! Thanks, guys, for all h... (by Josh Brown)
by aram4
Reading from a file to object
 
I have an input file with 6 lines of data, each formatted in the following way: X,Y,Z. My goal is to get the file name from the user, the store each line from ...
[1 reply] : Hi there, It seems like you have it pretty much covered. I would sugg... (by closed account o3hC5Di1)
by Plavsa
Pointers question
 
Hello pals, At todays class, we were doing some tasks with pointers. So here's the thing. Program: #include <stdio.h> int main() { int a = ...
[5 replies] Last: Slightly worrying that your teacher didn't know what was going on. (by mutexe)
by Zunock
HELP!!! calculating bmi
 
So- I'm trying to successfully run a program that calculates your BMI but, although it runs, it is not giving the the correct math. Instead, it gives me the num...
[2 replies] Last: For this project, it seems my prof. wants me to declare both the weigh... (by Zunock)
Wondering if I could get some help...
 
#include<iostream> #include<cstdlib> using namespace std; int main() { int i; int numWinsStay =0; int numWinsSwitch =0; int priceDoor, choice...
[6 replies] Last: I had gotten it fixed. I had gone to Project > Project Name Properties... (by Sinthed)
c programs (1,2)
 
my text file looks like this: lat long jan feb 90 80 45 67 90 34 56 78 90 45 78 56 55 34 56 78 55 67 77 89 55 56 78...
[21 replies] Last: Now i need to sum all these values within this range of lat and long, ... (by jyoti das)
October 2013 Pages: 1... 3435363738... 46
  Archived months: [sep2013] [nov2013]

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