Beginners - January 2012 (Page 32)

Defining data in classes
 
Any rule of thumb to follow when it comes to this? I've seen suggestions that say you should always define your functions/constructors/destructors in the class ...
[5 replies] Last: RB, that's what intelisense and right click -> go to definition are fo... (by LB)
by Tolja
MFC ADO
 
Hello, I'm writing a library keeping application for my personal library. In need of help how to search my access database for a given string.
[4 replies] Last: When I created a project i picked: database with full support, datasou... (by Tolja)
by danzai
Haversine Formula- trig variable error
 
I am getting the following error when compiling the code below: (111): error C2296: '^' : illegal, left operand has type 'double' (111): error C2297: '^' : ...
[2 replies] Last: Yes, that makes sense. It worked. Thanks again. (by danzai)
Game Board
 
Hello all. I need help putting numbers in each square for my game board. I'm working on Tic-Tac-Toe. I have the 2D array but I do not know how to put : ...
[2 replies] Last: @moot1, He said he already has a 2D array for his board, so why would ... (by ResidentBiscuit)
Day of the Week Program
 
I know the basics of what I need to do, but can't seem to get it all to work. I am using Visual C++ Express. #include <iostream> #include <string> usi...
[4 replies] Last: You will need this http://en.wikipedia.org/wiki/Weekday_determination (by ResidentBiscuit)
Expected primary expression before char?
 
void displayfunc() { FILE *fopen(const char *Back, const char *DIB); loadBMP(char *file) { FILE *in; in=fopen(file,"rb"); ...
[3 replies] Last: thanks a lot (by biplav17)
Dereferencing a Pointer to an int Through a Pointer to a Member
 
This is hard for me to explain, so I'll try my best. I'm trying to dereference a pointer through a pointer to a member. This is the class: struct Test { ...
[9 replies] Last: Cheers, Cubbi! Life-saver :) Wazzak (by closed account zb0S216C)
by zrrz
dynamically creating an array in a function
 
Hey guys, thanks for taking the time to read this. I'm trying to create a simple program that dynamically creates an array in a function then returns it so i ca...
[3 replies] Last: http://www.cplusplus.com/doc/tutorial/dynamic/ See the part about Oper... (by LB)
Need help with producing random numbers
 
Ok so i trying to create a random number generator, to generate random lotto numbers, but when i run the program i get the same number for all 5 here is the cod...
[9 replies] Last: aww man thanks peter that was good stuff i was under the impression yo... (by BarringtonT)
I know this is alot to ask
 
I would like to get this code to work. here the error: LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main Debug/Levensh Distance.exe ...
[2 replies] Last: I don't know, I just got thr code of the web. I am very new to C++ so ... (by sadsack)
problem: operator overload with classes
 
Hi all, I made some code that dosent work. I wrote it first for the stack, that means without "new" and "delete" and pointers. And it worked. The Problem i...
[2 replies] Last: float* Point::getCoord(void){ float Tapper ; Tapper = x; ... (by closed account DSLq5Di1)
Error to Build...
 
Hi all,i've got a huge problem with windows program This is the code : #include <windows.h> LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, L...
[1 reply] : Could you actually copy and paste the errors themselves? Just telling ... (by LB)
I'm lost and need advice
 
Hello all, I took a C++1 class and barely passed with a 72%. Now I am in C++2 and I have an assignment with a class and I have no clue what to do. I ha...
[4 replies] Last: I would start fresh, procedural C++ just means instructions are execut... (by D4rkZ3r0)
by dotjan
strings and function inside a class for beginners
 
Hi, how can I play with strings in functions? I would like to achieve something similar but of course it does not work. Actually these are only few lines I have...
[8 replies] Last: You seed the random number generator with the current time in pickOne(... (by Peter87)
Math not working properly
 
So I'm making a little program to help me calculate tax for math homework , but when i run the program the math is not working properly #include <iostream> ...
[2 replies] Last: Im writing on mac but i will be running in mostly on windows thats why... (by adrianooo231)
by ihato
Adding more info to the class outside it?
 
Let's say I have this class: class myClass { int x,y; public: int xx,yy; } How to add more info from somewhere else? I have tried...
[7 replies] Last: It's not a good idea, that is a HUGE waste of memory, not to mention a... (by LB)
STRNCPY overwrites?
 
Hey there, In the book it says the following code causes the new value of s to contain “Say Hi”, this string also displays onscreen because it is the val...
[5 replies] Last: Thanks for the tip, I was unaware of that function, since the book did... (by D4rkZ3r0)
Reading Bitmaps
 
I need to read some bitmaps in opengl. How can i do it? Or just using SDL is easier?
[2 replies] Last: I would like to use it. Eg: making background and doing other stuff. ... (by biplav17)
What is wrong with this code and why is the console windows closing?
 
#include <iostream> using namespace std; int main() { int X; int O; int x; int o; int selection; cout<<"Please select your tic-tac...
[2 replies] Last: Thanks a whole lot. So do you think the problem was that I did not put... (by Ekko Finch)
by ihato
The weirdest thing I have ever seen working on console *SOLVED*
 
I was about to make a simple game on console. I was a surprise on what I saw. 1.The whole console sparkles 2.Player doesn't move correctly. Some times he ...
[5 replies] Last: *facepalm* You people were right all the time. it's string(number... (by ihato)
January 2012 Pages: 1... 3031323334... 48
  Archived months: [dec2011] [feb2012]

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