Beginners - January 2011 (Page 9)

by kalkas
Problem with WindProc and PostMessage()
 
ok, i have this piece of code void main(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow){ ...............
[2 replies] Last: Ok problem solved. @Disch I know the best way i the way you're desc... (by kalkas)
Invalid pointer with string
 
Hi, I have a problem with this program. The goal of this assignment is to perform rot13 on a string. The math works fine, and the output is as expected. A...
[7 replies] Last: You problem is string anyKey = 0; use char anyKey = 0; ... (by crosa64)
Using a vector to read an array from a binary file
 
I've created a vector array, by obtaining a single value from a binary file. For this particular case, this number (nx), is 200. However, unfortunately i need t...
[6 replies] Last: Is there a reason you don't use ">>" to read in the stream? Because ... (by ne555)
what's this mean?
 
hey, i'm messing around with the <string> class... anyways, one of the constructors is kinda confusing... string ( const string& str ); what's the '&' m...
[8 replies] Last: yah you're right... i got them mixed up haha. * is dereferencing and &... (by kash kow ken)
Switch cases.
 
Is there any way that I can include a range of numbers in each switch case, like 80-89?
[1 reply] : Not really. The closest you can do is one of these: case 80: ca... (by Disch)
by acorn
which is more important to learn design patterns or templates
 
I wanted to know which is better use of my time learning design patterns or templates. i have design patterns elements of reusable object oriented software. and...
[5 replies] Last: ok thanks guys. I will check out C++ Templates: The Complete Guide als... (by acorn)
How to make C++ Buffer used pre-defined adress for its internal buffer
 
Hello, in order to avoid copying operations, I want to construct a stream which uses a pointer passed by me as an argument for its internal buffer. What ...
[1 reply] : It seems you're thinking about this too hard my friend. Check this out... (by Computergeek01)
Command line arguments?
 
Hello I created a guessing game program, and now I have to add a command line argument to it - in this case, if the user runs the program and adds "-n 150" ...
[8 replies] Last: Er, that won't work, and it tests on the wrong thing. Hey, that's n... (by Duthomhas)
by nevero
Invalid conversion problem
 
I've been having this bug for a couple of hour and I don't know what to try else. I have these two lines: std::vector<std::vector<std::string> > menus_;...
[2 replies] Last: Right, I knew it was a simple mistake. Thanks (by nevero)
Segfault on ifs?
 
Hi - I have a piece of code that is supposed to do a basic display of text files: #include <iostream> #include <fstream> #include <stdlib.h> using nam...
[5 replies] Last: Thanks, I changed it to such: #include <iostream> #include <fstre... (by DigitalDragon)
Array allocation
 
Hi, I'm pretty new to C++ (as you'll see from my question). I have experience in other languages, but that might actually be hindering me at the minute. O...
[5 replies] Last: thanks guys, that worked a treat: using the vector method. :) (by jazpearson)
ISO C++ forbids declaration of 'vector' with no type
 
error #.. ISO C++ forbids declaration of 'vector' with no type. why this error at a small code that? it's a file.h #include... class Vetor { pr...
[2 replies] Last: Works fine here: #include <vector> #include <iostream> class Vec... (by wolfgang)
Why do you have to include stdafx.h in Visual Studio?
 
Why do you have to include stdafx.h in Microsoft Visual Studio. What does it do? In the file it sounds like this is where you should put the header files.
[10 replies] Last: [quote=wolfgang] and just impairs your learning. I fail to see how i... (by closed account z05DSL3A)
by Faaz
displaying info REALLY STUCK ON IT
 
i need help ive got this program which adds all the numbers up and displays it on the screen but now i am really stuck because the next thing i want to do is ho...
[2 replies] Last: #include "stdafx.h" #include "gwin.h" const int MAXDAYS=6; // f... (by Faaz)
Guesing Game error? warning C4700: uninitialized local variable SOLVED
 
Ok so my game is runing, but i get some errors when runing the exe\Debug. And one Warning in the compiler. 1>------ Build started: Project: tut 16, Configu...
[2 replies] Last: wolfgang: To be perfectly honest i googeld for random number code fo... (by WetCode)
void main() and int main()
 
hey will anyone tell me when to use void main() and when to use int main() in 1-d array programming.
[11 replies] Last: Obviously Java creator feel returning int is redundant isn't it ? In ... (by moorecm)
Nonstatic member function
 
Hello I have a problem with error message: ...must be a nonstatic member function unlike any I have found on forums. My code is following: class A { ...
[3 replies] Last: coder777: Thanks, that is what I was looking for. (by TjSnake)
Creating a library out of a source file.
 
Hello I would like to know, how can i create a library (as i am noob static library would be more than enough for me ) out of source files. I obtained 3 source ...
[4 replies] Last: Make some object files: gcc -march=armv5 -c lpc313x_pwm_driver.... (by Moschops)
meaning of the const keyword appended to declarations
 
Hi, I'm looking at some of the overloaded declarations of member functions in classes. They have a const, which I know means constant, appended to the end of...
[3 replies] Last: thanks... that makes perfect sense :) (by kash kow ken)
deprecated config.h and map.h
 
Hi guys. I get warning that I'm using deprecated headers. When I searched my code I have only found map.h and config.h (where config.h include some more X.h...
[4 replies] Last: As for the map.h. I want to use that C++ container, I can't understan... (by sohguanh)
January 2011 Pages: 1... 7891011... 42
  Archived months: [dec2010] [feb2011]

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