Beginners - February 2011 (Page 11)

Dev-C++ Button Commands/Events?
 
Hey all, I was wondering if there is a code that i can use as an example to make a button in Dev-C++ open a program? I've seen it in use on YouTube, but all of...
[3 replies] Last: you could either use http://msdn.microsoft.com/en-us/library/ms682425(... (by hamsterman)
Can't pass a string to a constructor
 
Here are my 3 files: GroceryItem.h //Specification File hw3.h #ifndef GroceryItem_h #define GroceryItem_h #include <iostream> #include <iomanip> ...
[1 reply] : In your implementation you are defining a new function, not the constr... (by sadavied)
Question about function arguments...
 
I have a question about function arguments: Is it possible to send a particular function to another function as an argument? Also, is it possible to store...
[2 replies] Last: appnerd means int mul( int a, int b ) { return a * b; } ... (by jsmith)
?Trying to print out the factorial (n!) process
 
Hi, I am trying to print out the Factorial process such as 6!: Console output: Function returned: 6! = 1*2*3*4*5*6 = 720 However, I couldn't figure it...
[7 replies] Last: That works. The solution we were hinting at was this: for (i = ... (by jsmith)
Dynamic Variable Declaration
 
Hi, Is there a way to dynamically declare variables depending on user input? Say if n=3, the program declares var1, var2 and var3? Thanks.
[1 reply] : Use a vector. (or if you have to, an array) (by firedraco)
Non-in-place Merge Sort (maybe)
 
OK, let me try submitting this again and hope I don't get a server error. This is a portion of a question from my first HW. It looks ok to me and compiles an...
[12 replies] Last: Here's my code in case someone else needs to do a merge sort this way:... (by Touchstone)
by ts1000
time
 
can someone give me an example script or a link to show using time in cpp?
[1 reply] : http://cplusplus.com/reference/clibrary/ctime/ (by kevinkjt2000)
Problem with one of my functions
 
Can you guys take a look at my code? I am having trouble with with my sort function on line 90. The calculation of netpays work, but it doesnt sort. Can you giv...
[no replies]
Encountering problem with my array
 
This is my main code: #include <iostream> #include <string> #include <fstream> #include <iomanip> #include <cstdlib> #include <stdio.h> using namesp...
[4 replies] Last: Just fixed this by moving cin >> Scores ; from line 74 down to line... (by Gentleman1013)
Pankcake Array problem
 
I am currently working on an answer to the Pancake Array exercise found here:http://www.cplusplus.com/forum/articles/12974/ I am interested in knowing how to...
[2 replies] Last: #include <iostream> #include <string> using namespace std; int p... (by WillMalina)
Having trouble with a percentage
 
Hi im new to C++ and we are making a program in my class to loop an If Else statement. I'm having trouble getting the valid/invalid percentage as when the pr...
[1 reply] : code tags. It is infanately easier to read/diagnose with code tags. ... (by kernalSeiden)
reading input text problems
 
I was doing fine in my C++ class until we hit functions. Maybe we are covering material too fast for me. I have three different books that I am using with a fou...
[2 replies] Last: Thank you so much. I wished I found this site earlier in my C++ class.... (by bennyb20)
filling a struct from a text file
 
guys, I have a text "sales.txt" file which contains (id, lastname, quarter, sales) in the following format. 123 smith 1 333.20 221 doe 1 345.50 342 johnson ...
[10 replies] Last: this is how I tried calling it: declaration: void getData(employee... (by miatech)
class object as argument to member function
 
Hello, I want to have a member function that takes as argument another class. A simple version of the code is: // THIS IS THE FIRST CLASS class point{ ...
[7 replies] Last: I got the ideea with the constructor even if I don't see why I have ... (by Moschops)
Multiplying two integer arrays
 
I'm writing a C++ program where I have two arrays (firstNum and secondNum) which store two separate large numbers with each array space storing one digit. The n...
[1 reply] : int carry=0; int prod,i,j,rem; int base=10; else if ( op == '*' )... (by dmitriylm)
Button Click-> Directory search?
 
in visual Studio, how do I get a button click event to show a FolderBrowserDialog?
[12 replies] Last: Thanks, last question is if the statement should look like this: ... (by thenewguy)
by TNT
This problem made me confused
 
#include <cstdio> double mul(double a, double b); int main() { double a, b=0.45, c; printf("Enter the weight in Pound: "); scanf("%d", &a); ...
[5 replies] Last: You don't understand, if it simply multiplies two numbers it's complet... (by ultifinitus)
by Jawsh
How to automatically create variables???
 
HI everyone, I am trying to create a set of tasks that will loop according to the number of times the user has specified with different sets of variables. ...
[13 replies] Last: @chrisname: The actual arraysize function is this: template <ty... (by Disch)
C++ Maps Word Count
 
Hi, I think this problem has been asked before but please help me with this specific question. Word count problem to show the count of each word. I found t...
[2 replies] Last: Thank you. Stringstream is what I was looking for :) (by aquafina)
I think its bad rendering...
 
hey this is about opengl. anyone know about this? http://img208.imageshack.us/i/glitcheo.jpg/ if you know how to solve this then share some knowledg...
[5 replies] Last: i have tried with their cube and the game instantly crashed..... ... (by molma100)
February 2011 Pages: 1... 910111213... 43
  Archived months: [jan2011] [mar2011]

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