Beginners - October 2010

Strange results in std::string.substr()
 
Hello everyone, This is my first time posting and I'm happy to be here! I have not used C++ in a long time, however a project that I am involved with, has m...
[2 replies] Last: Ah that makes more sense, I seem to have misread the MSDN page for it!... (by dbridle)
cin file input integers
 
here is my code: #include <iostream> #include <iomanip> #include <cmath> #include <fstream> using namespace std; int main() { ifstream inFile; do...
[5 replies] Last: thanks for your help! (by Spiffy P Mcgee)
error: expected constructor, destructor, or type
 
Good day, This is the first time as a newcomer I have absolutely no idea what an error means. It says the following: " error: expected constructor, destruct...
[8 replies] Last: Thank you very much filipe !, your explanation is worthy to me. I've r... (by joseplusplus)
Unexpected return point in recursive function
 
The execution resumes from 2 instead of continuing from 1 after completing each cycle. I dont knw why that happens. Please help int palindrome(int first, i...
[1 reply] : Use the [/ code] (remove the space after the '/') to list your code ... (by jamesmk)
Whats wrong with my program
 
i dont why but i am not getting this program to work ( the second for statement) void main() { float celsius, kelvin, fahrenheit; ofstream output ("e:res...
[12 replies] Last: cout.setf(ios::fixed); cout.setf(ios::showpoint); (by jamesmk)
by r011
problem run exe on comp with no vc++
 
Hi I am new to visual studio and prishiate if somebody can help When start exe on my comp with vc no problem but on another comp with no vc I have message "The...
[1 reply] : Sounds like you need the Visual C++ runtime on the 2nd computer. Ho... (by jamesmk)
menu
 
please in menu driven programs, how do i get out of a particular menu after execution under that same menu to return to the previous menu in the program.......
[4 replies] Last: use a loop, then when your submenu exits, it's just back in the main m... (by jamesmk)
getline being skipped after first time through loop.
 
I'm really new to all of this, so bear with me. The first time the program goes through the for loop, everything is fine. But the second time, it prints the...
[2 replies] Last: Put your cin.ignore(1000, '\n') , or just a cin.get() , AFTER ever... (by jamesmk)
Access specific part of list
 
Right now I'm trying to write a graphics manager for a project in SFML. My idea is that whenever an object is made it checks with a list to see if the image fo...
[4 replies] Last: Ahhh.. I see. That map makes all the difference. I should have this ma... (by closed account 1yvXoG1T)
Already defined?
 
I'm getting errors saying that my classes are already defined in other functions. I had previously made a program similar to this but I don't have and I cant fi...
[3 replies] Last: either: 1) put the function bodies in a cpp file (not a header) ... (by Disch)
by harpo
.ini files
 
hello i have had trouble finding a ansure on google so im posting on this forum how do you write a string to a .ini file how do read read a section from a ini...
[7 replies] Last: It will still work. All that means is that .ini files are "outdated" ... (by Disch)
Stack
 
Hello Can anyone help me with the following question 1. Assume tht 'Stack' is the class described in this section with 'StackType' set to int and STACK_CAPAC...
[1 reply] : That would defeat the purpose of homework, now, wouldn't it? We may b... (by hamsterman)
Need advice on how to produce a bar graph
 
I need some advice on how to produce a bar graph where one * is equal to one unit. I have tried what it says to do in my book but it does not compile. Typed in ...
[2 replies] Last: Sorry, I modified it to at least show some of the bar graph. I need it... (by jmastin)
by fukki
do while with character problem
 
Hello, i have the following code char ans; do { cout<< "Do you want to continue (Y/N)?\n"; cout<< "You must type a 'Y' or an 'N'.\n"; ...
[2 replies] Last: Ok, thanks again Athar !!! (by fukki)
by fukki
Euro sign
 
Hello! I tried to copy it from character map but doesn`t work. Is it able to print (cout) a eurosign ? With a little search i read somewhere that is no...
[3 replies] Last: Thanks a lot Disch and Athar , i will give it a look! (by fukki)
smallest value error
 
i cant get the smallest value in this code. please help! // Find maximum and minimum element in an array. #include<stdio.h> int main () ...
[2 replies] Last: thankyou Athar! :) (by khattakjunaid)
read file into a 2D array
 
how do i write a function that reads a maze into a 2-dimensional array from the file maze.txt. the maze is a series of spaces and asterisks that has 30 rows an...
[1 reply] : std::cin.getline(cin,array ) + for loop = solution! Although ideall... (by Albatross)
by ToniAz
C Strings, Char Arrays, Char Pointers - Confused!
 
Hello everyone! Because some functions in C support only C strings, I am trying to learn about them. But I am really confused, what's the difference between...
[4 replies] Last: When declaring variables usage of empty automatically sizes the arra... (by Disch)
by DJ TLG
Linked List Copy Constructer Problem
 
I am trying to write the copy constructor for the following Menu class. When I run it, it doesn't show me anything. it just waits couple seconds than windows gi...
[3 replies] Last: If it was up to me i would take that route too. Unfortunately this is ... (by DJ TLG)
temperature convention program
 
hello i cant get my results under the right degree name any suggestion?? int main() {const double max_celsius =235; const double start_val =-100; const dou...
[no replies]
October 2010 Pages: 123... 42
  Archived months: [sep2010] [nov2010]

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