Beginners - December 2014 (Page 17)

iosfwd exception
 
This is the code that reads from a txt line by line, and encodes characters using ziv-lempel algorithm. I am not quite sure which operation causes exception. Ho...
[1 reply] : Hey, thanks for help :P Anyways, I found the problem. Problem was rel... (by o0reyiz0o)
Infinity problem
 
Hello, I need to use infinity in my program. int max = -oo; The compiler warns about that. I have tried to include <limits> header file but w...
[4 replies] Last: There's no such thing as infinity for integers. That said, you can st... (by Duthomhas)
by ebucna
remove spaces from string
 
Hi all, I need to compare strings but without taking spaces into consideration, so I need to trim my string of spaces (how ever many may there be) I tried re...
[2 replies] Last: thanks allot, work perfectly... (by ebucna)
Storing calculated values in an array
 
I have an assignment in which I must manipulate an array in several different ways. I am stuck on trying to change the values stored in the array so that they c...
[3 replies] Last: Line 10: void findDifferences(float, const int , int) and Lin... (by tcs)
I need help editing my code.
 
This is simple enough but I'm confused on how to change the getList() member function. Currently it's written assuming that only numbers are in the input text f...
[13 replies] Last: Hey that's fine I appreciate the help. That's why asking questions is... (by nichan79)
a simple question about c
 
Hi. Im just beginner about programming and i have problem about c. I hope you can help me. I use Devc/cpp. when i wrote my codes seems no warnings or errors. It...
[1 reply] : 1. scanf() needs a variables address instead of its value: scanf("%d... (by tcs)
by anhnha
function pass by both pointer and reference
 
I just came across a function definition as follows. I learned function pass by value, reference and pointer but this is new to me. Could you explain a bit? ...
[4 replies] Last: Well, they help! Thanks!!! (by anhnha)
by Lee125
Cannot count number of consonats.
 
Hello guys. i need someone help. i cant count the number of consonats. #include<iostream> using namespace std; int main() { char dta ; int num,i,to...
[4 replies] Last: What if the user enters the code for ' 'or '.' or '$'? You are counti... (by dhayden)
pow(19,20)
 
Given a numerical pattern below: 1^2 + 2^3 + 3^4 + 4^5 + .... + 19 ^ 20 What is the last last 5 digits of this pattern? #include <iostream> #inclu...
[5 replies] Last: thank you anup30 ! it seems I have to improve my math skills... thank... (by xgeutzu)
Need tutorial reference
 
Here's a code that I don't understand: int myints ={1,2,3,4} priority_queue<int, std::vector<int>, std::greater<int> >third (myints,myints+4); I don't unde...
[1 reply] : You should read this: http://www.cplusplus.com/reference/queue/priorit... (by minomic)
Binary Search
 
Write your question here. can anyone help me..i m facing a little problem while running this code... the problem is that if i enter a number which is not pres...
[2 replies] Last: thank you very much....:) (by israr00)
saving float array to dat file in a single operation
 
Hello Everyone, I am trying to write a float array to a ‘*.dat’ file. I am only partially successful and would appreciate some help and explanation of what ...
[3 replies] Last: @minomic , thanks a lot for explaining the meaning of setw. @dhayden ... (by dkumar3)
Finding C++ Easier then java
 
Okay, I guess i should start by saying I'm not a 12 year old kid asking this question I'm 17 years old. My question is I've dabbed around in Java and C++ for aw...
[5 replies] Last: I'm understanding the concepts behind the language easier then java... (by dhayden)
by Dannos
Function Problems
 
ive been working on a program to encode and decode text, currently just testing but when i run it the functions dont work when i type e or d it just quits but ...
[3 replies] Last: ... else { cout << "Error, please type again" << endl; main(); /... (by Lodger)
Why use so much macros in programming contest
 
I am new in programming. And just sat on my first ICPC programming contest in my university. I have seen some of the codes of prominent contest programmers and...
[2 replies] Last: Thanks for responding Perter87 . I got the idea... (by Gold Roger)
Problem in erasing duplicate words from a vector.
 
I am trying to erase all the duplicate words from a vector. I found a function unique(); I wrote a program using this function but it doesn't work as I wanted. ...
[2 replies] Last: Thank you..it works! :) (by abdalimran)
User Input Arrays Task
 
Hi Guys, Hope you are all well, I have to write a program for an online course, it is for the task below HOWEVER it must be designed so that the age of each ...
[6 replies] Last: else if(familyAges =>4 && <11) { ////you dont do that it should ... (by rjvc)
C++ array using multidimensional
 
How to make a c++ program that will output like this 1 2 3 4 5 .................................................................................6 7 8 ...
[3 replies] Last: Here is a fix // 2D array #include <iostream> using namespace std; ... (by Spikerocks101)
MergeSort - Out of Range !!!
 
Why it alway "out of range" when I excute #include<iostream> #include<vector> using namespace std; void Merge(vector<int> &a, vector<int> &left ,...
[1 reply] : int mid = n/2; ///use mid=(n-1)/2 (by closed account SECMoG1T)
tokens and stroustrup ch.7
 
I'm having trouble with tokens. I'm reading through chapter 7 of programming principles and practice using c++, and I've read through chapters 6 and 7 several t...
[no replies]
December 2014 Pages: 1... 1516171819... 55
  Archived months: [nov2014] [jan2015]

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