General C++ Programming - September 2011

reading in multiple files
 
I have a project completed where i read in a file and assigns the data in the txt file to a matrix. The problem i am having is that i have 8 data files named d...
[3 replies] Last: http://www.cplusplus.com/doc/tutorial/arrays/ And yes to your last qu... (by ascii)
by Bojan
C preprocessor, letter 'u' in #define statement.
 
Hello, Can someone please explain what does 'u' mean here? #define OS_TICKS_PER_SEC 120u You help is very appreciated.
[2 replies] Last: Thanks Wazzak. (by Bojan)
Encrypt archives?
 
Hey all, i am just wondering if it is possible to encrypt archives such as zip folders. I saw string encryption, and single file encryption, but not folder/ar...
[1 reply] : Yes, it's possible, if that answers your question. The question you're... (by Catfish)
by mely15
binary to decimal algorithm
 
using MOD how would I do this?? input 110 input base 2 print 6 im really lost :(
[1 reply] : The algorithm to transform numbers between bases has been widely cover... (by webJose)
by Thanz
How can we find the largest value?
 
How can we find the largest value in C++? like if a user enters 100 numbers how I'll find which one is the largest??? plz rep soon ...as its urgent
[18 replies] Last: Thank so much for both of you..I'll follow this rule in future...:) (by Thanz)
class within class confusion
 
Hello I have been to trying to fix the below code for the last one hour without any success. Could you help me, please? I was trying to compile it in Code::B...
[9 replies] Last: Thanks, mik2718. I have fixed it now. Thanks for the help. (by cpp4chimp)
Program help please! getting it to calculate grossPay
 
Ok with this program, I finally got my errors with this program figured out. Now i cant get it to calculate the gross pay correctly. i have: /* ...
[5 replies] Last: THANK YOU SO MUCH! THIS FINALLY WORKED! I AM SO GREATFUL! (by andywassup)
Spaces in Char array
 
im making a program that requires the ability to destinguish between spaces in an array, but for some reason, c++ isnt really acting the way i would expect it t...
[5 replies] Last: char(32) is exactly the same as ' ' . 32 is the raw number that th... (by Galik)
Random number program please help
 
The program runs but I want to add a loop at the end that asks user y/n repeat program. the program seems to generate the same random number a lot, is my num...
[6 replies] Last: I think rand()%MAX actually draws a value between [0,MAX[, thus not in... (by Gaminic)
Two questions about copy constructor
 
First: which one can I use to call the copy constructor? Class name is Student; Student obj; Student *obj_p = new Student; Student stu(obj); Student stu(*obj_...
[5 replies] Last: You can do that by taking the address of the referenced object, i.e. ... (by Athar)
by Srija
Data STructures (Queues)
 
Hi Everybody........... I have a simple doubt regarding queues. It has Front(deletion end) and Back(insertion end) At first both are initialized 0 TO inse...
[no replies]
need to make a c-string ignore spaces, case and punctuation!
 
I'm writing a function to see if an entered phrase is a palindrome but before I can manipulate my c-string (or array, either will do), I need to make it ignore ...
[1 reply] : Look up tokens and tokenize. When you break the phrase up into tokens ... (by buffbill)
Search for a character in a string
 
How could I search for a character in a string and return true or false? Cheers, George
[2 replies] Last: Try the following: Iterate through the string using a loop and if(stri... (by buffbill)
please help
 
Ok with this program, I finally got my errors with this program figured out. Now i cant get it to calculate the gross pay correctly. i have: /* ...
[12 replies] Last: ya but for some reason i cant get it to do that calculation (by andywassup)
looking for a lil help
 
this code should give a table consisting of 4 rows and 6 columns. 1st column should give 1-4. 2nd column should give the result of raising the number in the 1...
[1 reply] : what did I miss?????? An equals sign. yVar +1; //accumulator ... (by shacktar)
Having Trouble with File I/O
 
I'm trying to use file I/O for an event structure in my game. The event definitions go like: ::event <[action flag 1] <[action flag 2] >> My file has: ...
[2 replies] Last: o lol thanks (by RedTheGreen)
Using execvp
 
I need to use execvp to link together files that have been compiled by the program. Up to 10 .o filenames are listed in a string array. string compiledFiles...
[3 replies] Last: When the compiler complains that it cannot force the type of thing you... (by Duthomhas)
by gladi
pop function
 
what are the steps to pop the element from queue in a pop function? This is my code http://pastebin.com/gfYWcsfS
[3 replies] Last: I don't understand what you're asking. Just use what I told you to fi... (by ascii)
Pointer Problem
 
Could you check the error, please? I find the problem, the problem is the pointer problem for (*rdatap) Anyone can tell me why and how to solve this? The...
[3 replies] Last: Finally, I solved this problem. It is reading problem, instead of conv... (by dingyong198608)
$ sign (as in BASH) to represent variable
 
Hi, I am converting a bash script to a C++ code and to develop it further with C++ I am also not so experienced in C++. My question is I have a HTML file...
[4 replies] Last: Oh ha.. finally I saw some Perl RE input in this forum! Those cryptic ... (by sohguanh)
September 2011 Pages: 123... 31
  Archived months: [aug2011] [oct2011]

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