General C++ Programming - March 2009 (Page 3)

Randomize without repition
 
so i've tried and tried and tried and changed my code about ten times in the last hour, its getting really frustrating, so i decided i'll sign up and ask for he...
[1 reply] : Hi. If your goal is to get random numbers without repeating numbers th... (by Repentinus)
mutex ownership problem
 
Hi, I have two threads in my application. thread 2 must wait for thread1 but it doesn't because thread2 runs before and takes the control, so how can I give ...
[10 replies] Last: great.. :) (by writetonsharma)
structs with list
 
so im making this struct and i want to include a list in it : struct student{ int id; list<classes> clist; }; well i...
[4 replies] Last: it might be same, but these were my view where the error can be.. :) (by writetonsharma)
Error in using static map
 
I am a C# .NET programmer who has recently switched to c++, and thus my understanding on some things could be a little fuzzy... i am attempting to create a s...
[2 replies] Last: static member variables of a class have to be defined outside the clas... (by guestgulkan)
value returning function question...
 
whats wrong with the following function? Thanks for any help!!! bool Greater (int a, int b) { if (a > b) return true; }
[2 replies] Last: yea i was thinking it was something along the lines of that, thanks. (by chewykb24)
by wretch
Code review, Proxy pattern, 64 lines
 
One of my primary C++ goals is to study all of the (Gang of Four) patterns, From what I understand, there are our common scenarios which would suggest use of...
[2 replies] Last: Thanks very much seymore15074 for looking at this. And yes, I agree... (by wretch)
Memory Allocation Question
 
Hi Guys, I am really confused. Basically, what I am trying to do is, I have a struct which has a data member a char * . Now this char * will allocate a...
[1 reply] : Memcopy just copies each member, so you will have two pointers pointin... (by Gumbercules)
Dev C++ Compiler Issue
 
Has anyone ever had an issue with Dev-C++ v 4.9.9.2 not producing a physical executable file after compiling? For some reason it's only creating all of the .O ...
[3 replies] Last: i use 5. somethingso i wouldnt know but my school used that version an... (by freakytb)
by jimctu
Pronlem with \0
 
hello ppl... well...i have a very strange problem... I have an array of chars, and a buffer, that read a text file and pass char by char to this array... til...
[2 replies] Last: uhn... ok, thx... i´ll do it like u said... ^^ thank u...it was v... (by jimctu)
i need code for point of sale using classes
 
i need a C++ code for point of sale system plz help me !! likefor taking the payments n genrating reciepts for their puchases.. i have a set of classes --l...
[no replies]
reading jpeg file
 
Hello, I'm a fairly new user to programming and my skills are still very young. I'm interested however in reading data from a .jpg file. I'd like to know ho...
[1 reply] : libjpeg http://www.ijg.org/ looks promising, I haven't used it though. (by Gumbercules)
by olove5
can someone give to me a tip to solve the main()
 
#include "10_exampr1.cpp" using namespace std; void includeName(); char GetString(char *msg); struct PersonNode{ char name ; ...
[3 replies] Last: char GetString (char *msg) { char s , i,*destinoItem; cout<< msg... (by Gumbercules)
encryption
 
I want to be able to encrypt my save files so that no one except for those whom have the extractor are able to read it. the way i am saving the files is... ...
[6 replies] Last: okay, i also noticed that i put the wrong file extension on for the sa... (by freakytb)
Confusion about pointer object
 
I am a pretty experienced programmer, but there is one thing about pointers that confuses me. I will try and explain the best I can: Normally in a function l...
[1 reply] : The pointer is destroyed, not the thing it points to. (by jsmith)
array equality trickiness
 
Hi, I would appreciate, if someone explains me why is this true: a == *(a + i) == *(i + a) == i #include <iostream> using namespace std; int mai...
[10 replies] Last: See: Not that it has any practical use beyond that of obfuscated... (by jsmith)
how to check for spaces in a line of words
 
how to check for the number os spaces in a line of words? wad code must i use? is it isspace()?
[4 replies] Last: Also std::count_if( text.begin(), text.end(), isspace ) if by ... (by jsmith)
by galaxy
The Destructor ruins everything
 
Hi everybody I really have a problem with calling the destructor Yes, the destructor ruins everything to get you in my problem I'm working with lists of s...
[2 replies] Last: Thnx bro It really worked now I understand everything (by galaxy)
by bito
functions
 
how do i go about his question,am required to write code that prompts the user to enter 2 characters and an integer and the out put should display the character...
[1 reply] : 1. get the chars and the int 2. have 2 nested loops and output in the... (by Bazzy)
by olove5
Problem with main()
 
#include <iostream> #include <cstdlib> #include "10_exampr1.cpp" using namespace std; void includeName(); char GetString(char *msg); struct Pers...
[no replies]
controlling the output on each line
 
how do we control the number of output on each line? #include <iostream> #include <cstdlib> using namespace std; int main(void) { int number; for...
[2 replies] Last: thanks man csiz u r the greatest (by comput14)
March 2009 Pages: 12345... 21
  Archived months: [feb2009] [apr2009]

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