Beginners - May 2009 (Page 9)

by Rithie
BYTE, WORD, DWORD Binary Files
 
Hi guys, I have that write an binary file a object of 40 Bytes: #include <iostream.h> #include <fstream.h> using namespace std; typedef unsigned ch...
[3 replies] Last: It is because you are playing with a class and not a POD. Google aroun... (by Duthomhas)
by jcr
issue with fastcgi program
 
Hello, I am struggling with the following fastcgi C++ program with access to a postgresql database through the SOCI library. All the components work individu...
[no replies]
by Tilpo
finding the caller of a function
 
hey all you people out there! how can i refer to the caller of a function? i used as3.0 before i decided to start with c++ and i was used to make a function...
[10 replies] Last: Generally, no. Few of the types and containers defined in the the sta... (by PanGalactic)
by nanger
enumeration as member variable
 
hi, I want to know why those enumerations are defined as public members of the class in the following codes I think those such as SELECT_ORDER,SELECT_TYPE ar...
[1 reply] : This is so code outside the class can use these enumerations as well. ... (by Disch)
How to handle char pointer ?
 
Hello, I'm using the snippet below to understand how to handle char pointers. This snippet shows the string char by char. I understand "m" is a pointer, ri...
[6 replies] Last: You've got it. For a more complete understanding of pointers, I su... (by dfarmer)
arrange contacts through zipcodes with malloc, array of pointer to struct
 
so i just started on this, got one week to finish. and i am absolutly lost. typedef struct info a; #include "stdio.h" struct info { char name ; ...
[12 replies] Last: well i got it done, i just need to break into 2.c and 1.h, or somethin... (by makneltek)
What's the "unix" variable is?
 
I found that there is a variable called "unix" which I don't know who has defined. Its size is 4 bytes and its value is integer 1. My OS is Linux, and the comp...
[3 replies] Last: OK, I see that. No wonder the compiler told me unix can't be lvalue! ... (by lilydjwg)
std::count for strings?
 
Hey guys, I am rather new to using the C++ STL, and I would like some help with the std::count function. I have a list that contains strings, and I would like ...
[2 replies] Last: well my problem is that m_FindRepeats always returns 0 fixed the ... (by paulius)
by x1101x
Open a window without libraries or premade headers
 
Literally just joined this forum five minutes ago, needed a community to learn c++ from. Before c++ I used game maker, and in many ways their the same (at least...
[5 replies] Last: I think what x1101x is trying to do is understand the actual function ... (by Tripic)
copy vs assign
 
Still a little fuzzy on this: I know a new object can be initialized to an existing one using myclass objectB(objectA); But is it correct that an already e...
[3 replies] Last: Cool. thanks disch. (by VictorH)
windows.h not getting along with the rest of the program.
 
#include <iostream> #include "windows.h" <-- Including "windows.h" (or <windows.h>) causes the errors! #include <limits> using namespace std; ...
[4 replies] Last: Perfect! Thanks guys, that worked like a charm. :) (by rootboy)
reading file outside project folder
 
I am just starting to use files in C++ and want to know if there is a way to read a file outside the projects folder. I have one program that writes informatio...
[3 replies] Last: In case you're using Windows, note that the forward slashes will work ... (by helios)
by Noha
Overloading operators
 
Hey, I took this example from the tutorial and modified it by overloading the operators: -, --, &. #include "stdafx.h" #include <iostream> using namespac...
[1 reply] : How exactly would you pass an argument to the overloaded -- ? Or not ... (by Duthomhas)
by nanger
about .h and .cpp file
 
videostream.cpp class VideoStream { static std::vector<PChunk> chunk_list; ///< The vector of all chunks diffused through the overlay static size_t cur...
[no replies]
Who is better?
 
What would you prefer string object or string of char. what would you prefer vector or array. My opinion is that char is better than string,and vector is ...
[8 replies] Last: ...and unless you have huge amounts of data to store in the deque. (Ve... (by Duthomhas)
2D array display
 
how do i code a loop to display a 2d array of chars???
[1 reply] : You need too loops, one on the outside and one on the inside -- called... (by Duthomhas)
Encrypt
 
How do i make a c++ program that takes the letters in an input and reads them separately to encrypt them by giving them all values how do i then make it so that...
[1 reply] : i would use a string to get the user input, make it an array, then cal... (by kyle11778)
Everythiung seems to be closed...
 
Dang! I join, and everythuing I want to discuss is closed to archive. How do I discover that is active, here? Ron.
[3 replies] Last: Thanks for the suggestion - just making newbie mistakes. (by rascalcode)
by Noha
Unions
 
Hi, Wanted to check the values of the variables "hi" and "lo" after inserting values for the array char c (this example is taken from the tutorial). un...
[9 replies] Last: SDL does something similar to helios' example for events. It sticks a... (by Disch)
by Noha
Pointers to functions!
 
Hi guys, Here is an example about pointer to function (was mentioned in the tutorial): // pointer to functions #include <iostream> using namespace std; i...
[4 replies] Last: Yes (ish). functiontocall is a pointer to a function. It points to ... (by guestgulkan)
May 2009 Pages: 1... 7891011... 21
  Archived months: [apr2009] [jun2009]

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