General C++ Programming - January 2013 (Page 18)

Super Beginner Needs Help
 
As I said, I'm just learning programming and I cannot find out what is wrong with this code. These are the errors it gives me. 1>MSVCRTD.lib(crtexe.obj) ...
[1 reply] : Don't do this: cin >> name >> endl; do cin >> name; ... (by Smac89)
A class constructor.
 
TinyGPS::TinyGPS() : _time(GPS_INVALID_TIME) , _date(GPS_INVALID_DATE) , _latitude(GPS_INVALID_ANGLE) , _longitude(GPS_INVALID_ANGLE) , _...
[2 replies] Last: Thank you. That answers my question very well. (by esepich)
Broken C string code
 
I am going through an old C++ book for fun and doing all the exercises to refresh some C++ concept I have forgotten or haven't used in a long time. So with that...
[4 replies] Last: use this code to successfully compile. I use time to randomness deal e... (by Sadegh2007)
by Vex5
Beginner help
 
Hello everyone. Recently I have been given a book called "Data structures and program design in C++" by Robert L. Kruse and Alexander J. Ryba. This book cove...
[1 reply] : C: How to program 7th writers: Paul Deitel . Harvey Deitel it's reall... (by Sadegh2007)
Wave (.wav) samples
 
Hi everyone, I am trying to do something with sound in C++. The C++ standard doesn't include sound, so I'm using a nice Windows API (don't scream that I need...
[5 replies] Last: for starters, 8 bit sucks not only because the quality is horrid but a... (by Disch)
Winsock 2, bind problem & WSAGetLastError
 
I have a function that takes my a Socket object and binds it to a port. But the bind function returns an SOCKET_ERROR. When I try to call WSAGetLastError it jus...
[17 replies] Last: Oh bloody hell why did I forget that -_-' And it works, thanks for poi... (by TheBreadCat)
Sprintf (?)
 
Hello! (sorry for my bad english.. english isn't my native language) so, i'm creating a copy files program.. and a friend of mine said that if I use sprintf...
[2 replies] Last: sprintf writes to an array/string not to a file int sprintf ( char * ... (by Smac89)
by Sara7
weekly cost calculator using arrays and function decomposition
 
Hi, I need help with my code for this program that needs to find the total cost of the week for each memeber, show the members with the max and min total cost, ...
[no replies]
Small but strange question about "++"
 
Hi, I want to increase the value of some elements of an array according to a certain condition. For example the following code: array <int, 100> myArray ...
[2 replies] Last: Thank you Cubbi for your prompt reply. Now I get it! (by dekeenfrance)
What Next?
 
Learn Game programming or Windows API programming first? What are your thoughts? Which one do you think would be best to learn first, assuming you intend on ...
[5 replies] Last: lazyfoo I believe has SDL tutorials. I used to like SDL, but it has r... (by Disch)
Optimizing timing functionality?
 
I've written a timer function in c/c++, but it still has performance problems. Anybody knows how to optimize this further (atm works with delay to perform timin...
[3 replies] Last: @Santosh Reddy: startThread starts a new thread (parameters are a poin... (by superfury)
**p : pointer how????
 
#include<iostream.h> #include<conio.h> void main() { clrscr(); static int a ={0,1,2,3,4}; static int *p ={a,a+2,a+1,a+4,a+3}; int **ptr; ptr=p; **...
[2 replies] Last: By the way function main usually is declared as int main( int argc, ... (by vlad from moscow)
'double' alignment effect on speed
 
I would like to know if forcing 4-byte alignment for 8-byte primitive types (doubles and long longs) can have any negative effect on efficiency? I'm thinking ab...
[2 replies] Last: > but probably there's a reason under Windows 'doubles' are always ali... (by JLBorges)
file handling problem
 
Please someone help me in this program: A program which takes input from user and write it to a file then it reads data from that file then it should search ...
[1 reply] : Can you show what have you tried in advance (by Santosh Reddy)
Read variables and methods of another program in memory
 
hello i want to write a program that can access to variables and methods of another program. I ques for access to variables need to read memory, but about meth...
[1 reply] : For that you need to know the methods symbols to call them, try readin... (by Santosh Reddy)
programming presentation
 
I've made a project which works on LAN connection and I'm gonna present it in ma school exhibition.Its basically a simple prototype of banking application.Trans...
[3 replies] Last: You can use it in applications like - Online Banking - Walth Manageme... (by Santosh Reddy)
Encrypting for the first time
 
I am currently studying at college C++ and we pretty much covered everything there is in terms of Procedural Programming. Now we are moving into stuff like SDL,...
[2 replies] Last: #include <iostream> using namespace std; void Encrypt(char * LOL) {... (by Santosh Reddy)
Tiling in SDL
 
I'm in the beginning stages of designing my first video game using SDL, and have run into a bit of an impasse. I attempt to draw the map using a simple tile fun...
[1 reply] : I revamped all of my code and perfected my functions to no longer rely... (by jim hurley)
Need Class Design Advice/Tips
 
Hey guys, So recently I switched over to C# to help get a better grasp on class design and object oriented programming in general. So I thought the best way ...
[1 reply] : The basic approach seems ok. The bigger challenge you face is how to c... (by Santosh Reddy)
& Operator
 
I am having a little bit of trouble determining the exact meaning of this line here: TinyGPS &operator << (char c) {encode(c); return *this;} I think there is...
[3 replies] Last: the second one... it mean that paramter (value right of operator) of t... (by Santosh Reddy)
January 2013 Pages: 1... 1617181920... 36
  Archived months: [dec2012] [feb2013]

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