Beginners - November 2011 (Page 40)

by dlt
do while, while, and eof
 
I have to write this program that reads from a file. The file contains a first name, last name, and an unspecified number of grades. I have to display the last ...
[2 replies] Last: What I was doing above was just a test to get my loops working correct... (by dlt)
Random Numbers
 
(rand()&4)+1; Why is that sometimes producing a 5? I thought that could only produce 1-4..
[2 replies] Last: oops, I knew that too...Thanks. (by InterFiction)
time header
 
I was programming along, like I normally would. When I tried to run my program the time.h popped up with an error. Usually this isn't open. All I did was includ...
[2 replies] Last: okay, I think I see what caused it. In my header file where my prototy... (by InterFiction)
TMP and codebloat
 
How could we measured the relationship between types and binary files generated by compilers? template<typename T> T Max(T const A, T const B) { ret...
[no replies]
Segmentation fault in C++ code using deque STL in push_back function
 
I am declaring a structure as this typedef struct Request { deque<int> roomsList ; }Request; Then , in some other function I get a segmentation fa...
[1 reply] : Put a limit when you read into a char * . Or use a std::string inst... (by ne555)
postfix expression C++
 
I made a program and I have a problem here. Problems :: 1. This code accepts 1 digit only if you enter 5 6 + this program shows 11 but it you enter 11 22 + ...
[no replies]
Expression processing
 
I've been trying to understand how C++ works through expressions, and built a small program to play with them. #include"stdio.h" #include"stdlib.h" cl...
[2 replies] Last: That's what I'm saying. (by vorticidal)
by Kenan
Assigning array values.
 
I am attempting to write a trigonometry program in which 6 possible values can be put into formulas (depending on which variables are known, different formulas ...
[1 reply] : cout << "b: "; if (invalue != "n" && invalue != "N") {... (by vorticidal)
by kw1991
text file not displaying right (1,2)
 
I'm trying to display a text file with has a list of students with some details. There are 15 students but when i run the program only the last student shows up...
[20 replies] Last: both solutions are not working for me #include "stdafx.h" using n... (by kw1991)
linked list, help needed please
 
i've to code my own linked list of doubles with insert, deleteMostRecent, display and count functions. i've been following lecturer notes but am getting some er...
[1 reply] : can anyone give a bit of help??? please! (by smallmos)
need help with pointer
 
can anyone help me rewrite the function i wrote below using only points and pointer increment/decrement? I dont have much experience with pointer so I dont know...
[1 reply] : I have no idea what your asking for? But the following also works. ... (by binarybob350)
Need help regarding my calculatepay function
 
I'm facing this error "no matching function for call to `Employee::calculatePay' I figured is because I have not return any value in my calculatePay(). However...
[1 reply] : Change float Employee::calculatePay(float bPay) to void Employe... (by binarybob350)
Need help with sscanf()
 
I need help on manipulating strings with sscanf(). How do you split "123/456/789" into "123", "456" and "789". And "123/456/789" into "123/456/" and "789". ...
[1 reply] : Your format can be extracted with this call: sscanf("%d/%d/%d", ...);... (by closed account zb0S216C)
c code in linux
 
i am writing a code which is as follows: #include <stdio.h> int main(void) { char buffer ; FILE * myfile; myfile = fopen("/home/csgrads/akhan015/des...
[4 replies] Last: "Sounds like a problem for a script. Why would you want to do this in ... (by amnakhan786)
Segmentation error
 
Hi, I'm facing this problem in c++. I'm able to compile my main.cpp but when I run it, I can input data into console, but upon finishing the data inputs, There ...
[8 replies] Last: Problem solved. I added return type for the function. thks! (by Tian Zhi)
Inventory Program: Console or Win32?
 
I have recently started teaching myself programming and have gone through a C++ tutorial that I found on this site and I understand most all of it. My friend wa...
[1 reply] : Okay I probably know less than you, but a really cool tool to try out ... (by Matt Cromer)
While loop or If error
 
I feel like I am running headfirst into a wall on this one and I am sure it is something easy. There is something wrong with my while loop. After inputting a...
[3 replies] Last: if I were to use cin.peek(), it would only take the next character. ... (by mzimmers)
C++ on Mac Os X Lion
 
can any one tell is there a c++ in mac os x lion?
[1 reply] : http://www.cplusplus.com/forum/beginner/675/ I found this thread abou... (by Dstrayex)
Structures problem
 
if (input ==1) { cout << "what would you like to change it to?" << endl; cin >> holders; ...
[3 replies] Last: because holder is the user's input that you want to use to change arra... (by SpectresShadow)
Strings vs. String Literals
 
Hey, I'm new to this forum and I wanted to ask a question, I'm reading a book about C++ and they keep mentioning string literals, as well as strings. I don't un...
[2 replies] Last: Thank You! (by Dstrayex)
November 2011 Pages: 1... 3839404142... 65
  Archived months: [oct2011] [dec2011]

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