General C++ Programming - April 2010 (Page 11)

adjusting my nested for loop
 
I am currently stuck on a issue with my multiplication table program. I have the entire program done, but the even # times table must have an incorrect cal...
[no replies]
ARRAY ELEMENTS
 
Hello people; Please does any one know how to return the location of the maximum and minimum elements in an array from a function to the main. I mean the lo...
[6 replies] Last: #include <iostream> using namespace std; //the trick is in sendin... (by justAbeginner)
compare two values in an array
 
Hi, I need to compare two values in a double*, from this comparison i want to compute which is smaller in size. Any ideas in how I could do this? Ryan
[1 reply] : If dp is a pointer to double, then *dp is the double. then use oper... (by jsmith)
by betibu
Opencv Ip Camera video capture problem
 
Hi! I'm trying to capture video from Ip camera using opencv. However I always take null image. I'm not find where I make mistake. Here is my code sample. Can...
[no replies]
by fafner
header file problem
 
Ok, I'm a bit embarassed to even ask this, but here goes: I have a program with one main.cpp file, and a class contained in Foo.h and Foo.cpp. Foo.h contains...
[8 replies] Last: @Computerquip: Okay. Good point, I has only developed on Mac and GNU/L... (by Albatross)
RECURSION
 
Hi everyone; I have a question here but i don't understand what it is actually asking.I need to understand this because something similar will be asked in my ...
[2 replies] Last: yeah thanks..... (by shani09)
by nc90
merge derived classes
 
i have a design that was implemented with a base class A and derived classes B and C. now i want to merge all this functionality into one class. approaches s...
[3 replies] Last: Additionally, you'd have to watch out for the diamond problem with mul... (by moorecm)
convert double to send in message PDU
 
Hi, I am currently developing a networked game using TCP/IP. Im really a beginner with C++, however I do have programming experience with other languages. Cu...
[no replies]
feof() returning 16 before the end of file
 
Hi, I've been stuck with a buig for the last few days now, and just wondering if anyone could help me out with it. Basically it's a fread problem, where fread ...
[1 reply] : Ok, someone in my office just solved it. Just incase anyone else is... (by Ultrapingu)
by Natha
unidentified
 
\Source\irc.cpp(662) : error c2065 'i' : undeclared identifier the error is on line: rndnick = '\0'; script is: char *IRC::nickgen_rndltr(void) { ...
[5 replies] Last: Except that rndnick = (rand()%26)+97; rndnick = '\0'; should be i... (by Albatross)
toString() method?
 
IS there any possible way to make the << ( insertion operator) to work with an instance of my class? I mean, suppose i have a class like this: class Fo...
[1 reply] : Yes, overload the << operator with this signature: std::ostream& o... (by firedraco)
by AJM
printf() and dumping a char array
 
Hi, I have the following array defined: unsigned char data ; After performing a fread and populating the data array I can successfully dump it's cont...
[2 replies] Last: Thanks firedraco, printf("%c", data ); fixed it :D AJM.... (by AJM)
by jbl09
exponents in c++
 
is there any other way to solve a base and its exponent without using pow or a for loop?
[2 replies] Last: Maybe if the base happens to be 2...but generally, no. (by moorecm)
by AJM
Very basic memory allocation and cout questions
 
Hi, I am reading 32 byte chunks from a file and storing them in a character array. 1. What is the difference in defining that array as: char * buffe...
[3 replies] Last: Great, thanks very much guys. AJM. (by AJM)
file into array
 
how do i read file into array. size of the number in file is not fix, code should be able to read any size of numbers. and i have to make a function to read in ...
[1 reply] : [co de] tags please. (by PanGalactic)
C++ GUI
 
I am currently writing a C++ program (Mastermind) involving GUI. I created several buttons in a groupbox.let's say Groupbox1 in each button, i inserted an ima...
[no replies]
by Cn00b
Loop issues
 
I need a template that will show me how to loop though an array at each index. I am not quite sure how this is accomplished, but at the moment I have a ton of ...
[1 reply] : for (i=0; i < 100; i++) //where 100 is the number of elements in your... (by closed account 1yR4jE8b)
Storage-class specifiers and declarations
 
Hi there! I try to understand the section 7.1.1.7 in C++ Standard: The linkages implied by successive declarations for a given entity shall agree . That...
[6 replies] Last: http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/topic/com.ibm... (by maikel)
by mayarb
rand function
 
I want to use rand function that generate numbers form number bigger than RAND_MAX. how can i do this? thanks, maya
[2 replies] Last: // assuming RAND_MAX is 2^32-1 u64 rand64() { return ((u64)ran... (by Disch)
by fafner
problems with objects in vector
 
I'm quite new to c++, and this is the first time i've used vectors so please bear with me;) I have a vector that stores objects of class Note. I can push_bac...
[9 replies] Last: YES, THANK YOU!! That was it, thank you so much;) (by fafner)
April 2010 Pages: 1... 910111213... 24
  Archived months: [mar2010] [may2010]

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