Beginners - March 2011 (Page 46)

by Bog
Looping assignment
 
Write a program that asks the user for the number of bolts, nuts, and washers in their purchase and then calculates and prints out the total. As an added featur...
[3 replies] Last: The total cost of the order would be (nuts*price)+(bolts*price)+(washe... (by Roastern)
String to Int
 
Im making a simple program that orders numbers from least to greatest. Is there a way for the user to enter all of his numbers and type "done" and the program ...
[9 replies] Last: isalpha() doesn't do any conversion. You want to use isalpha() to chec... (by Zhuge)
returning nothing
 
Is it possible to return nothing from a function which is defined as int? What I try to do is: I have a stack class,if you peek it checks for the position o...
[6 replies] Last: A functional possibility is the Maybe monad . The problem with t... (by Duthomhas)
Binary to string convert
 
I copied two methods in these site:http://devpinoy.org/forums/t/1339.aspx and http://www.codeguru.com/forum/archive/index.php/t-323807.html I worked assemblin...
[no replies]
by nosam
Accessing a structure in another function with a pointer
 
Can I declare an array of structures in a function and access it from other functions without passing it by reference? ex. struct TsuPod { stri...
[2 replies] Last: If you want variables to be visible within functions without having to... (by closed account D80DSL3A)
by HMW
The logic of ::npos?
 
Hello all! I found the following example in a textbook - and adapted it to suit my needs. The problem is that I don't fully understand how it works, even aft...
[4 replies] Last: Yes, you got that right. Thank you again for your effort. Sinc... (by HMW)
What is wrong?
 
originally I had this code: Which worked correctly #include <iostream> #include <string.h> using namespace std; //prototype int processline(char*); ...
[1 reply] : The problem is in the way you moved code from main to the new GetStrin... (by doug4)
Repeating function in c++
 
Hi, I am trying to create a c++ program that will intake an original value of x_0 to begin a function that uses the previous value of x to calculate the one in...
[12 replies] Last: What we told you earlier. You defined the function not as f(x), but as... (by hanst99)
Which library would you command for video processing?
 
I am using openCV2.2, openCV have a lot of useful algorithms But openCV2.2 is not really "upgrade" to C++ style since it have to compatible with c style fun...
[no replies]
implicit constructor
 
"Incidentally, an object’s implicit constructor is always called before the explicit one you define. When your explicit constructor starts to execute, your ...
[2 replies] Last: Thanks Bazzy, I got it now. (by oldnewbie)
Cannot open include file: 'graphics.h': No such file or directory
 
Hello Experts, I am using Microsoft Visual Studios C++ (32 bit compiler). Graphics.h is not supported by it. Can anyone tell me the possible replacement for ...
[3 replies] Last: WinBGIm http://www.cs.colorado.edu/~main/bgi/visual/ Good luck! (by Duthomhas)
by Nik999
copy folders in C++ overwriting changed files
 
Hi, I need to write a program that copies a folder with all its subfolders to another loacation but I need to overwrite ONLY the files that have been changed si...
[no replies]
by sdbd
c++ and iterator
 
Hello,this is my first post!:) I write from Italy and I'm a beginner. I have an error with a little program that using set. I post the code: #inclu...
[1 reply] : The problem is that i must write this code: set<Neighbor> getNeighbor... (by sdbd)
Iterating an Array
 
Hello. I am new to C++. I've completed about five exercises discussing loops, logic, and arrays. I came to the final exercise of the chapter and became stuck...
[5 replies] Last: I got it. Just looked through material for sorting. Other people on ... (by RazalShort3)
Different way to search an array?
 
I have to write a program for my class the makes to arrays on with a tax rate and another with a income. The user inputs a gross income and the program searches...
[3 replies] Last: @Albatross I don't think line 18 can hear you =) Generally arrays ... (by ultifinitus)
fstream questions
 
is there a cleaner way of achieving this std::ifstream subfile(test.txt, std::ios::in); std::string s1, s2, s3, s4; bool b1, b2, b3, b4, b5; float...
[6 replies] Last: class Example { int data1; char data2; // etc. friend... (by Zhuge)
Questions on c++
 
If you write a function that should use call-by-reference, but forget to include the ampersand, what will happen? What is the value returned by the following...
[1 reply] : 1) Your compiler should throw an error message at you for not matching... (by closed account 3hM2Nwbp)
Trouble with my functions...
 
I am writing a payroll program which sorts netpays and can not get this compile. Can you guys give me pointers? Especially on the employee class definitions.. I...
[5 replies] Last: so it may be the structure of the functions If, you're still using ... (by matsom)
Problem with file and loop
 
edit.
[15 replies] Last: bump (by mookial)
Trouble with "left" and "right" keystroke
 
Its 5 files (2 headers and 3 .cpp) This one is where the keystrokes are found (name: display (2).h): #include <windows.h> #include <cstdlib> #include <st...
[2 replies] Last: http://msdn.microsoft.com/en-us/library/ms927178.aspx use the enums in... (by ne555)
March 2011 Pages: 1... 4445464748... 52
  Archived months: [feb2011] [apr2011]

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