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

an array to hold 5 randon numbers generated by rand();
 
ok so i wrote a program that stores 5 random numbers into an int lotto_array. the output is always 0 0 0 0, it doesnt generate 5 random numbers or at least ...
[2 replies] Last: i compiled the program on rhel 5 and its giving perfectly 5 random num... (by writetonsharma)
winsock receive problem
 
Hi everybody, I'm working with winsock TCP sockets. I receive a char array from the recv function. We send the value 0x27 and we receive the following data: ...
[17 replies] Last: I mean do this: to send you do this: sendto(socket,(char*)&msg, s... (by writetonsharma)
programming pic board to send SMS messages
 
I have a PIC board with built in GSM capability (must insert valid SIM card into board) that i'm programming for a senior design project. The board came bundled...
[3 replies] Last: here is the send protion. please help with receiving/reading texts fro... (by MattPol)
by mykolg
Modifying Link List node information
 
Im trying to use the standard library and use the Link List to store information that I am reading in from a file, but I need to modify the information to be he...
[4 replies] Last: Sorry, I remember calling it LList in class, but you are correct in st... (by mykolg)
by dooper
A Distance calculating program
 
How to make a program like if user enter two cities got it's total distance as output. I am quite newb in C++ so help me out. Here is the table for questi...
[1 reply] : You can create a 2D array and store there the value of the distances a... (by Bazzy)
Iterating through bits
 
Hello, I'm trying to test a decoder that I have implemented in hardware.I need to iterate through the bits of a 16-bit word and invert them. Each inversion c...
[1 reply] : You could use a bit mask such as 0x0001. Then, XOR (^) it with your w... (by jdd)
by tition
Invert a number mod N
 
Dear all, I need to invert numbers mod N - the faster the better. I would appreciate any comments on the below code. To invert a number X mod N means to find...
[2 replies] Last: The language is a constraint, although probably less so than the funct... (by tition)
what is wrong with this?
 
what am i doing wrong? and how can i add a "do u want to continue option at the end" Y or N ?? Error 1 error C2440: 'initializing' : cannot convert from 'voi...
[6 replies] Last: For example: if (compchoice == 0) cout << "I picked Rock "; cout... (by kbw)
Check type of the objects created?
 
I am not sure what i am even asking exists, but just thought i ask. Anyway, i have to create 3 objects of different types and i am suppose to count the objects ...
[19 replies] Last: Thanks for the insight! I guess i will have to cheat a bit by starting... (by shaoen01)
Generating NTLM password hashes
 
I've looked, and searched, and researched for months now, but I can't find any detailed, specific information on how to generate an NTLM hash of a text string u...
[no replies]
Little confused on how to used pointers with this?
 
I understand the problem itself. And I understand what happens by pulling out every 4 values which is what I'm meant to do I'll explain that in a second but her...
[13 replies] Last: Just posting this back I figured out out before but I did it like this... (by Mythios)
how to get the end of the file? ios::ate doesn't work well.
 
Hello all, I've just writen the codes to get the size of a log file: ifstream fin("/var/log/logfile",ios::ate); int size = fin.tellg(); But it...
[4 replies] Last: To writetonsharma: Thank you for your suggestions. I've tried that s... (by start2046)
Error C2100
 
Alright I'm having problem with this program where I have three different classes but the functions don't seem to be working because of it being a pointer or I'...
[3 replies] Last: After playing around with it for a while I got it to work, but it's no... (by infotechish)
undefined reference to `ReadFromFile(int&, int&, int**&)'|
 
Hello, I get this message from Codeblocks when it tries to link my project files (it compiles them without problems) undefined reference to `ReadFromFile(...
[4 replies] Last: onur The problem is passing the third parameter by reference. You... (by guestgulkan)
inline functions and performance
 
How do you decide which functions must be inline and which are better leaved as-is? When function just returns a member, I have no doubt, but how far can that s...
[2 replies] Last: Inlining allows the compiler to elide generating instructions to call ... (by jsmith)
Networking?
 
My problem in a nutshell: I own a truck company. I must visit 3 cities to show off my trucks to customers. There are a total of 6 cities in the townshi...
[1 reply] : hey tim, i tought you were tim bryant but found out u were taufeek. i ... (by phantomeye)
Creating a numerial timestamp in C++?
 
Hey Guys, I would like to know how can I create timestamp in numerical format? e.g. 2003-06-22T20:57:29 (or any other format that is available) I need ...
[1 reply] : man ctime (by jsmith)
matrix transponation
 
Hello everyone , I write a program , but I dont know how to add a matrix transponation after readint it from a folder .. this is the program, but it doesnt hav...
[no replies]
by jhelo
delete structure (1,2)
 
i'm a newbie in this structure function, string functions, and i have this project of mine due on tuesday, march 17. Our professor wants us to have a book infor...
[26 replies] Last: ok.. thank you thank you!!! mwah!.. :] (by jhelo)
line connecting two points in VC++
 
Anybody knows how to display two points connected via a line in MS Visual C++?
[3 replies] Last: ignore the rest of the details, just see the basic thing. PAINTSTR... (by writetonsharma)
March 2009 Pages: 1... 1011121314... 21
  Archived months: [feb2009] [apr2009]

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