Beginners - January 2013 (Page 49)

printf help
 
int main() { char boolean ={"TRUE","FALSE"}; printf("%s",boolean[(unsigned int)-1 == ~0]); } i dont understand the (unsigned int)-1== ~0 can any one ...
[2 replies] Last: The real puzzle is the character string. char boolean ={"TRUE","... (by Chervil)
milanuncios mallorca
 
This is an English forum so please use English.
[no replies]
"undefined reference to" statement
 
Hello, I'm doing exercises on classes in c++ and I'm writing a program that should store and convert Roman numbers in decimal numbers. I'm compiling with code::...
[4 replies] Last: Thanks a lot! I linked it properly and now it works! (by roovraven)
Modify a binary file
 
Hi, I'm making a phone-book,i wanna edit a record of person.I tried to use seekp function to do so but failed,i'm using ios::app mode. Guide me how to replace...
[3 replies] Last: Use the following example which written by using FILE . But be sure t... (by tvrameshmc)
by jaded7
strongly typed enums
 
Hi, how can I forward declare a strongly typed enum? I'm getting a lot of compiler issues when I try the below... enum class exampleEnum : short; enum clas...
[13 replies] Last: Just checked. Outdated by a fair amount. That more or less solves my p... (by jaded7)
by mike99
Acessing Array elements with pointer
 
Hi, I dont seem to understand why I am not able to acess array elements properly. Here is a part of the code string A ; string* Astr; Astr=A; int cnt...
[3 replies] Last: @mike99 Why do you want to do this with a string? You can use the at... (by TheIdeasMan)
inheritance problem
 
Let's say i have two classes, A and B. class A{ protected: _member; ... } class B : public A{ ... } It seems that i cannot access A's dat...
[8 replies] Last: @zhaorenbo ListBase is an abstract class - it has pure virtual funct... (by TheIdeasMan)
Aborted (core dumped)
 
Hi, I am trying to implement a linked list. Here's my code: 1 #include <sstream> 2 #include "ListLL.h" 3 4 using namespace std; 5 6 LList::...
[6 replies] Last: Copy constructor logic is also wrong try this updated code. LList::L... (by tvrameshmc)
C++ Video: Introduction of STL - Associative Containers
 
This video covers Associative Containers: set multiset map multimap http://www.youtube.com/watch?v=6iyzPed7FrM
[no replies]
Removing Punctuation From A String
 
Hi everybody, Been coding C++ for about a week now haha, and have run in to a problem. I am working through a book and one of the exercises calls for reading...
[9 replies] Last: You could use a string literal if you would write the expression corre... (by vlad from moscow)
declarations differ
 
can someone tell me the difference between this declaration and the function useage: void *cube_updater(void *); // in header file cube_updater ( void *rs2...
[3 replies] Last: I see that there is no semicolon after the statement. Also it is not c... (by vlad from moscow)
We'll be making tetris using C++
 
Hey there, can you help me to make a simple tetris game using c++? no graphical user interface is fine thanks ;] [[our professor is an idiot]]
[no replies]
Platformer Game Physics
 
In a simple platform game I'm making, when the player lands after he jumps he goes a small amount into the floor (or platform). I understand this is because his...
[2 replies] Last: Yeah. Instead of moving them all the way into the floor or simply not ... (by Zhuge)
by jorz
struct with classes
 
Hi all, I would like to use a struct in c++ with classes I use visual studio it does not allow me to define it within the current class my visual s...
[4 replies] Last: Does anyone know how to do this? (by jorz)
Populating an array with unique random integers
 
I am trying to populate an array with random but unique integers for later use in a minesweeper game. I am not very familiar with rand and srand . Here's an...
[1 reply] : Read this. This discusses a couple of widely used ways to achieve this... (by ResidentBiscuit)
by Marcan
Pancake glutton exercise!
 
Hi all! I've been doing the pancake glutton exercise as seen here: http://www.cplusplus.com/forum/articles/12974/ and I'd really appreciate if you could take...
[5 replies] Last: Sorry for the slow reply. Was on break and was much busier than I expe... (by ResidentBiscuit)
Creating Windows Application
 
I need to create a Windows Application, which will change the MacAdress of my LAN connection after pressing a button (better if it will work automatically whe...
[2 replies] Last: Here's an interesting link about this. I may be playing with this for ... (by ResidentBiscuit)
C++ Video: Introduction of STL - Unordered Containers (Hash Table)
 
This video covers: unordered set unordered multiset unordered map unordered multimap associative array The unordered containers are introduced in C++...
[no replies]
Trying to check if input is an integer & within range
 
Hello I am trying to test if the cin input matches my criteria. I want the program to check if the input is an integer AND if it's within range (1-4). It is f...
[4 replies] Last: Well you need to either specify somewhere in the scope of cin that yo... (by bennyboy)
by WaaaaW
Polymorphism with functions with different arguments
 
Hi; this might seem a silly thing to ask, but I'm wondering what's the best way to solve this issue: Currently, I have four classes: Actor, Monster, Player, ...
[4 replies] Last: That should be pretty much all that it does, exactly as you described ... (by WaaaaW)
January 2013 Pages: 1... 474849505152
  Archived months: [dec2012] [feb2013]

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