General C++ Programming - February 2012 (Page 35)

by tnngo
Help with Passing value in and out of function
 
I need some advice from the smart folks here at cplusplus forum. I have a homework assignment where I am proving the birthday paradox that if 23 persons are cho...
[1 reply] : This is what I need it to look like ultimately :) why? Once you gener... (by buffbill)
by Algren
3.41PI C++ PrOgram
 
I have made a c++ program to calculate the value of pi using conitnued simple fractions: http://mathworld.wolfram.com/PiContinuedFraction.html Here is the (T...
[4 replies] Last: in any case why not use: PI=atan(1)*4; (by buffbill)
Celcius to Farenhiet_Table Display
 
Program is supposed to convert celcius to farenhiet or vice versa, then display a start and end temperature with conversions and original entries. There is an i...
[1 reply] : put your code inside code tags and provide verbatim compiler errors. (by buffbill)
Distance Converter
 
In this program I am attempting to read in 2 distances in MMM::FFFF::II format... convert to inches ... add together... then convert back and to MMM::FFFF::II f...
[12 replies] Last: I don't know enough C++ to know if this is bad or not (is it casting s... (by vin)
Help it quick.
 
I have a variable of type int say telephone and having value 2340 in it,now i want to stor this in string what should i do? i can't use index with telephone,a...
[3 replies] Last: Modern C++ int value = 2340; string str = std::to_string(value); ... (by Cubbi)
SDL Program Ain't Respond !
 
#include "SDL.h" #include <iostream> #include <string> using namespace std; SDL_Surface *load_image( std::string filename ); void apply_surface( int x, ...
[6 replies] Last: Yes,I'll take a look at SDL_Event, It might have solution for event ha... (by hentaiw)
Why is this segfaulting?
 
// This is part of a library called OgreBullet. The program segfaults when this function is called. void TriangleMeshCollisionShape::AddTriangle( ...
[9 replies] Last: Just FYI there is no recursion here, as I am sure "AddTriangle" (the f... (by LB)
by dumkat
Unsigned Char help
 
I have an array of unsigned chars unsigned char* stuff; I need to get this into a mysql database to store. My question is how do i get this into some s...
[15 replies] Last: I gave up on mysql connector. I am going with mysql++, appears to be m... (by dumkat)
by rzaj
Help with Asterisks Triangle
 
I need to create a program that shows an inverted and right-justified triangle of asterisks. The amount of rows is determined by a positive value entered by the...
[1 reply] : Remember that there is no "empty space" on the screen; there are spac... (by Duthomhas)
Static data member
 
So I'm getting an error and I'm not sure why. I figured I would throw it out there to see if anyone can help me. I have a couple of classes. I want to use an...
[1 reply] : class Pool ; // declare Pool class MyObject { private: int id; st... (by JLBorges)
Item being skipped
 
MB is a message box and for some reason it is not being reached, I've got to go to work in a minute so I figured maybe someone can spot the problem while I'm th...
[3 replies] Last: After modding DBAdd() to except an optional third parameter to prevent... (by awsdert)
String conversion - help
 
Hello guys, I need to split a string line into a vector of strings, and after that I need to save one index of vector into an int variable. I am doing like s...
[no replies]
by evb
declared struct compiles as 'undeclared'
 
I have a program (main.c) that includes the header rpc/rpc.h which includes the header netinet/in.h which contains the header cygwin/in.h which contains the str...
[4 replies] Last: Found a workaround. This question is moot. (by evb)
by evb
RPC clnt_create fails: unknown prototype.
 
When I run this (under Cygwin): #include <stdio.h>#include <stdlib.h> #include "rap.h" #include <rpc/rpc.h> clnt = clnt_create("s4c",300456,1,"TCP"); ...
[5 replies] Last: Turns out I was mistaken about which environment I was running under. ... (by evb)
Fstream Library Structure Help
 
Hey, I'm working on a C++ file opening library that implements I/O and several useful functions and that also supports Rich Text Document Formats such as : (*.d...
[no replies]
error LNK2019: unresolved external symbol
 
Hello! I am workign a project where we have to estimate the height of a child. I am trying to test my work thus far but I keep getting the same error, error LNK...
[2 replies] Last: thank you so much!! I figured it was something simple I was overlookin... (by djames11)
Formula Help Needed
 
How can I express this formula in c++? Amount = Principal*(1+r/n)^((n*t)) Thanks in advance.
[2 replies] Last: Providing you named them as variables, what you've typed is perfectly ... (by MrHutch)
by Jinz0
Shuffling a deck of cards
 
Hi all, im working on a simple deck of cards project and i've got to the shuffle bit and hit a brick wall. Im not sure how i am meant to do this as our tutor...
[5 replies] Last: I hope that clears some things up :) It certainly does! You good t... (by clanmjc)
float to int conversion
 
It is a simple concept wherein I have to get rid of the fractional part of the floating point number: double d = 12.34 int i = d; Variable i would just c...
[5 replies] Last: You can use a debugger such as gdb, olly or ida. I can tell you it sim... (by closed account o1vk4iN6)
by Bob M
Borland C++ Builder 3 & Windows 7
 
I bought this compiler back in 1998. Paid $275 for it, and never used it much. Currently it is not installed on any of my computers. The book says it is for W...
[3 replies] Last: This is why I have a hard time swallowing the cost of any proprietary ... (by closed account 1yR4jE8b)
February 2012 Pages: 1... 3334353637... 43
  Archived months: [jan2012] [mar2012]

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