General C++ Programming - July 2011 (Page 25)

Need Help with push back function in a list class i created
 
I see so i need iterator, , this is what i thought 2 . Thanks alot
[1 reply] : First, there is no need to write this->empty()==true in your if clau... (by aquaz)
by dams
C++ function arguments
 
() func (int abc); //in header file. () func (int ab) { //definition of the ABOVE function (in some other file). int b; b = abc; } In the definition, i w...
[12 replies] Last: This is one of the warnings that is enabled by -Wextra. It's not enabl... (by Athar)
by Phiru
I am making a triangle.
 
Hi, i have a question about checking if a point(when mouse is clicked) is in a triangle or not.So, i am working on it with MFC. here is thing. A triangle is...
[4 replies] Last: hum... second mothod is quite complicated. so i use first one. I got... (by Phiru)
CS/CIS
 
Hey everyone, I'm considering getting a degree in CIS. I'm very interested in programming and it seems like CIS has that. I've been looking at the class diff...
[no replies]
Returning a Struct from a header file
 
Hello, I have a working struct return from a function that only works from the main.cpp file...I would like to move the function to a header file...Here is the ...
[6 replies] Last: argh...declaring struct 'Pairs' in ReturnMutipleValues.h instead of ma... (by paulmcco)
making codes shorter
 
int n1, n2, n3, n4, n5; int a, b, c, d, e; cout << "Enter 5 numbers:\n"; cin>>n1>>n2>>n3>>n4>>n5; if(n1==n2 && n1==n3 && n1==n4 && n1==n5) cou...
[7 replies] Last: Or just: const int numberCount=5; int numbers ; for (int i=0;i<number... (by Athar)
by Brad1
Need Help Please
 
I am new to C++ and I am trying to figure out why the program will not get the number of days in a leap year correct. Any help is appreciated! #include <iost...
[6 replies] Last: year%4==0 is not the correct definition of leap year. it is : year%... (by buffbill)
Returning a Struct from a function
 
Okay, we discussed this before but I'm trying to return a struct from a function...(within a header file) Here is the struct: struct Pairs { int pairCard1...
[16 replies] Last: I put the Pairs ReturnStruct() function in a header file but when I ru... (by paulmcco)
Multiple Main() Functions
 
I was wondering if it would be possible to have two main functions in one program running coincidentally (at the same time). I need both the mains to execute at...
[3 replies] Last: Oh all right, appreciate the help. I have a Mac and Windows. I could u... (by TheCreator)
problem using std::copy
 
Hello, I have a pointer to an array of doubles that is 2448 in size. I can easily traverse this array and output any or all of the values using pointer arith...
[5 replies] Last: Also, if you are going to use db.begin() as the OutputIterator (last p... (by jsmith)
Returning Multiple Values from a Function
 
Hello, I need to return two separate values from the following function...within the function is a loop that compares variables and is supposed to return the nu...
[11 replies] Last: Hence the could . (by closed account 3hM2Nwbp)
by sgcole
Variable Assignment Tool
 
Hello, I'm trying to write a tool that can read text file and use the information to assign values to variables to I have a data analysis program I use for r...
[2 replies] Last: I'm still getting the compiler error: plotter.cc:1585: undefined refer... (by sgcole)
HELP! Avoiding duplicate enteries.
 
I'm having an assignment where I have to make a book library in C++ using several classes through an inheritance heirarchy as well as composition. I'm stuck at ...
[12 replies] Last: Edit: reply clashed with hamsterman. (by writetonsharma)
Reading from a binary file, outputting 0s and 1s as txt
 
Hello! Basically, I have a program that captures data from the serial port of the computer and saves it as a binary file whose output if opened in notepad is...
[11 replies] Last: [quote=champion7891]@Grey Wolf...that does not work....any other ideas... (by closed account z05DSL3A)
.exe exits after program being called
 
I have this code in this format: int main() { some function(); } The program just exits after function being called (function executes when i type some ...
[5 replies] Last: std::cin.get(); //what I use (by closed account zwA4jE8b)
Can you all know the error im having?
 
i have a slight error in about line 57 something didnt add properly im not really good at this yet please help me with this? #include <iostream> using names...
[5 replies] Last: i want when i choose 1 i dont want to see the "how many connections su... (by witiw19)
by ehmind
fstream and '&'
 
I try to compile my code from a book, can be seen at here (page 49) : http://books.google.com/books?id=4jHUX-7Qw-UC&pg=PA34&lpg=PA34&dq=where+I+can+find+input...
[2 replies] Last: I changed #include <fstream.h> #include <stdlib.h> with this #incl... (by ehmind)
by mubeen
can we call a class to an other class an fanction in an other function
 
can we call a class to an other class an fanction in an other function
[4 replies] Last: thx i have also checked its posible thax alot (by mubeen)
by mubeen
pass a string value to a function in a class which is entered by user
 
how to pass a string value to a function in a class which is entered by user and already been initialized by constructor in case 4 it doesn't ask to enter a st...
[2 replies] Last: thax i have solved the problem that was not this (by mubeen)
Ending a program within an "if" loop - break, exit(1), or something else?
 
hey, i would like to write an "if" loop so that when the condition of the if loop is satisfied (so the statements in the if loop runs), the program quits. ...
[11 replies] Last: I didn't mean for them to be used in the same code, just two different... (by closed account GbX36Up4)
July 2011 Pages: 1... 2324252627... 30
  Archived months: [jun2011] [aug2011]

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