Beginners - June 2010 (Page 24)

what does this mean
 
int i , j c = ((((i&0x8)==0)^((j&0x8))==0))*255 What does it mean ???
[8 replies] Last: You try reading this code, It is the openGL and cheakImage is an array... (by vampire)
error: initializer fails to determine size of 'state'
 
Trying to generate a function to get a char array. Heres my code: #include <string> #include <sstream> using namespace std; char* getstate () { ...
[4 replies] Last: Thank you both (by Toothkiller)
Weird outcome
 
So I wondered if you could do cin>> var1, var2; and I made this little program. the only flaw is, it always says FALSE =S #include <iostream> using nam...
[2 replies] Last: Thanks (again) Albatross! (by xander333)
New to C++ , Converting C#.NET to C++ (Unmanaged / Managed ???)
 
I'm New to C++, normally did most of my Programming in either C# or VB.NET I've written a DLL in C# that is used to Communicate to our Software via a BiDriec...
[1 reply] : Code for above DLL using System.IO; using System.IO.Pipes; usi... (by PGP Protector)
by romasi
Passing between class methods
 
When passing non-const passed values from one overloaded method to the other causes a segfault but once they were changed to const it worked fine... curious as ...
[6 replies] Last: I would strongly recommend that you get into the habit of writing cons... (by jsmith)
Problem with template class
 
Hi Guys...First, sorry for my English, I'm not american... I already know about templates class, but I can't split the declaration and the implementation int...
[6 replies] Last: But then, there is a question: The STL classes, like vector, list, et... (by moorecm)
myList.erase(reverse_iterator)
 
i want to erase some elements in the list pointed by a reversed iterator,and i wrote like this list<int>::reverse_iterator it=mylist.rbegin(); mylist.erase(it...
[7 replies] Last: I believe 'itr++' resolves to list<T>::iterator::operator++(). Erase ... (by Disch)
Function only works if I use constant variable - why?
 
I have a program with a few functions, for example one to display records and one to read them from a text file. When reading them from a text file, if I use...
[4 replies] Last: This program should really be done with a std::vector, I suggest you l... (by filipe)
by bijan
Multiple commands?
 
So, Im working on an rpg and now pwople cant buy muiltiple things from the shop. Heres the code #include <cstdlib> #include <iostream> #include <cmath> ...
[1 reply] : Because the shop command should be a loop with an option to escape. No... (by Computergeek01)
exception:list iterator not decremental
 
Hi. In my code I used a list to simulate a circle and declared two iterators to traverse it. while running,an exception appeared after eight elements was prin...
[1 reply] : Use code tags, don't cross post http://cplusplus.com/forum/general/... (by Disch)
Alternative to strcpm()
 
hey guys.... I need some help with the strcmp() function. I need to know an alternative way to write this because strcmp() gives error invalid conversion from '...
[10 replies] Last: Yep Wikipedia is your friend, I worked it out using wiki for your meth... (by bobhaha)
Which overload function is prefered in this example?
 
The Example is taken from the < c++ primer > ( 4th Edtion ) by Stanley B. Lippman, and it resides in P681. He says : There are an overloaded function set which ...
[4 replies] Last: OMG! All of sudden, i am enlightened, what a surprising. Thanks you, r... (by akilguo)
Counter variable not storing
 
Trying to write a program that increases a int when called and saves the int so when called again its previous int+1. At the moment it returns all zeros. Her...
[2 replies] Last: Thank you, it worked. (by Toothkiller)
by hogren
Write in Binary format in a binary file
 
Hello, I begin by give my code : #include <ostream> #include <istream> #include <fstream> namespace std { extern istream cin; extern ostream cout...
[5 replies] Last: Thank you very much ! I will study the bitshifting. Bye Bye (by hogren)
Construction, address and value of private variable
 
Hi All! I am having some troubles of understanding C++ vairable lifecycles. I wrote a tiny application(1) to understand it, but it only complicates the thing...
[2 replies] Last: Athar, thanx for your reply, now I really understand how it's working! (by user1024)
How to bridge the gap between newbie and intermediate programmer?
 
Hi, I'd like to ask experienced programmers for advice on how to proceed. I've read 1 book on C and 3 books on C++ and browsed innumerable web sites by now a...
[3 replies] Last: Debugging helps me in cases like this. It helps you to see application... (by user1024)
using recursion to generate verses of Twelve Days of Christmas
 
Im trying to make a program that generates all the verses of the song "The Twelve Days of Christmas" using recursion (its homework). Ive read what the book says...
[3 replies] Last: Thanks guys for the help! (by jen5376)
by bijan
Save int's
 
Hey guys, Im making a C++ rpg as my first app. And i was wondering how do i save intigers to a computer for later use? Thanks, Bijan
[1 reply] : Via file I/O. http://cplusplus.com/doc/tutorial/files/ Welcome to ... (by Albatross)
by gcr114
quick little divison problem
 
Hey guys, I need to create a program that will: take a meal total, tip amount, and output the meal total, tip amount and tip+meal. #include <iostream...
[2 replies] Last: Note: your "cin >> " statement within the first "if" block retrieves t... (by jrohde)
Storage size unknown
 
Morning: I am creating this code to read numbers from a file and then some of the numbers of the file are used to calculate the average of those numbers and ...
[10 replies] Last: Thanks for the advice Albatross, I forgot about that part. I pretty ... (by gcardonav)
June 2010 Pages: 1... 2223242526
  Archived months: [may2010] [jul2010]

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