General C++ Programming - April 2015 (Page 7)

by Kyi
Bjarne Stroustrup Eg 4.6.4 A text example
 
Hello there, I am a newbie to c++ programming. Lately I am facing an error while doing examples in Bjarne Stroustrup "Programming Principles and Practice ...
[2 replies] Last: That shows sorting function is not going well. Oh you have saved me fr... (by Kyi)
by rb737
Rounding a double to nearest odd int
 
Hello Everyone, I hope you are all doing well. I am having a bit of an issue and i have been going at it for quite some time and cannot figure it out. ...
[3 replies] Last: #include <iostream> #include <limits> int nearest_odd_integer( doubl... (by JLBorges)
random number between 0 and 1: C vs C++11, C wins?
 
Hey guys, I want a function to get random numbers between 0 and 1. I tried it c-style with rand and c++11-style with a default_random_engine I came to th...
[3 replies] Last: hm... interesting that I never came across that... thank you! (by Gamer2015)
help me please code is not working properly
 
#include<iostream> #include<conio.h> using namespace std; class polynomial { private: int expo; int coeff; polynomial *next; int num_of_terms; ...
[no replies]
How to read a line of sentence from a text file in c++
 
I have a problem. My code can read a line of sentence but when i try to print them the white spaces seperates them. here's my code: void viewRec() { reco...
[1 reply] : Post the Output: I'm not exactly sure what you mean. (by Engineering)
input of first polynomial is good but during the input for second polynomial while loop terminate please help me ....
 
void polynomial:: polynomial1() { //polynomial *head, *temp, *newnode = NULL; cout << "Enter number of terms : "; cin >> num_of_terms; for (int i = 0; ...
[1 reply] : - newnode 0x011f9ff8 {expo=0 coeff=0 next=0x00000000 <NULL> ...} poly... (by saad abbasi)
String Substitution Problems
 
Having a bit of trouble with my String Substitution program. It's supposed to open a file, then paste the replacement into another file. It's supposed to re...
[7 replies] Last: These are not errors "when trying to compile." This is behavior exhib... (by cire)
Deleting Pointers
 
I have a pointer array declared as such: Object* m_objects ; I have a function with the below code in it: Object* pSourceObject = NULL; for(unsigne...
[6 replies] Last: forgot to put in that foo is a pointer to some place in memory. N... (by Disch)
project
 
Let An be the set of all decimal (base 10) positive n-digits integers, 1≤ n ≤ 20, having the following properties:  The numbers of An consist only of 0...
[no replies]
Segmentation Fault in linkedlists
 
Whenever I try to do and Application function I am returned with "Segmentation Fault" Core dumped, I don't quite know where the error is coming from. So any hel...
[1 reply] : Probably line 93. You tried to make a comparison to current->data, exc... (by Ispil)
Double Linked List Issue
 
I'm having issues with this program. When I enter more than 2 extra I.d's and try to use the display function it'll only display the head and the tail of the li...
[6 replies] Last: Thank-You so much! This has really helped out a lot! I didn't realize ... (by Engineering)
What's wrong with this code?
 
One of the main purposes of this code is that it's supposed to ask the user to enter a number for the length of an array, and then enter the values of the arra...
[5 replies] Last: Well that was not the problem at all. I figured out that all I needed ... (by Thanase)
reading txt file and calcualting results
 
Hello , I am working on an assignmen: Write the following program. When you have completed the program, submit the source file assign6.cpp as an attac...
[no replies]
by uter
The postfix expresion with binary tree
 
I need to convert Z:=(x>-1) AND (X>0) AND (X<1) AND (Y<-X*X+1) to post-fix expression. But Here I have code that return Illegal Token even with simple expresion...
[14 replies] Last: So is there any programmer that would resolve this issue: bool IsOpe... (by uter)
Review my Source Code
 
This program is a random password generator. It asks the user how many chars they want their password to be and how many passwords it should generate. I used t...
[3 replies] Last: Wow! Thank you so much! I'm glad you took the time to help me out, tha... (by MarkyMark)
by n00bie
I am buidling a payroll tracker and need help
 
As stated above my ultimate goal is to build a payroll tracker that when i run the program it asks me how many hours i worked stores that to a variable in a txt...
[5 replies] Last: So I learned something new in class the other day and I really think i... (by Druizzz)
Linked list
 
I am trying to understand how to implement one. Maybe I just don't understand pointers here. #include <iostream> using namespace std; struct Node { int...
[3 replies] Last: In that example, it isn't necessary because nothing ever uses the list... (by kempofighter)
CAN YOU HELP ME GUYS? COZ ITS TO BE SUBMITTED TODAY 10 AM PH time
 
PREMID 1. Define two strings called employee and company along with a float called rate and an integer called hours. Initialize employee to "RobDaBlob" a...
[4 replies] Last: Physically coding that shouldn't be difficult. Up to you how to displa... (by KyuubiCalvary)
Will rand() ever be deprecated?
 
I know std::random_shuffle is being deprecated and removed, but I want to know if std::rand() is ever going to be deprecated. I think not because rand() comes f...
[2 replies] Last: Thank you for letting me know. :) (by Peter87)
by MsNora
Debug Assertion Failed- Invalid Null Pointer
 
Hello guys. Recently, I had run a project/solution in Microsoft Visual C++ 2010 Express. The build was successful. But when I try to debug the solution, an erro...
[no replies]
April 2015 Pages: 1... 56789... 28
  Archived months: [mar2015] [may2015]

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