Beginners - May 2016 (Page 20)

Syntax Question Re: Vectors
 
Hello everyone, In the first code example I am just trying to print out a simple vector. But I get compilation errors. In the second code, the compiler gives...
[1 reply] : Look at http://www.cplusplus.com/reference/vector/vector/ There is no... (by keskiverto)
Binary Search Runs Blank (Code Review)
 
I am trying to make a program that implements a boolean binary search function (without using the algorithms found in the Standard C++ Library) that is tested b...
[8 replies] Last: That was very helpful--thank you! (by Pegasus1)
by Bligen
Having a certain command throughout entire code
 
Is it possible to have a certain command throughout the entire code? For example if at any time f9 is clicked, the program shuts down what it's doing and start...
[2 replies] Last: Question 2 Found some very old code, but it still works - probably onl... (by Thomas1965)
by ztdep
can not find the class member in the base class
 
Dear friends: I write a templates code , but i met the following error when compiled with g++4.8.5 vector.h:72:16: error: 'sze' was not declared in this sco...
[1 reply] : https://ece.uwaterloo.ca/~dwharder/aads/Tutorial/2z/ Program 3 in th... (by Moschops)
Im trying to input data from a while into struct but the program is crashing. Can anyone take a look at this
 
This is stored in a record.txt file: 12 kamil 23 25 45 43 15 saad 56 61 34 76 23 kamilhassaan l231 435 567 12 This is what I wrote: #include <io...
[9 replies] Last: So i tried to extend my practice; 1, kamil hassaan , 2, 3, 4, 5 2, sa... (by kamilhassaan)
Combining two programs into one with a menu
 
Hey there guys! I am working on some homework for my Programming class and I had to create two programs: one that converted pounds and ounces to kilograms an...
[4 replies] Last: jlb has already explained what you have to do. Do you understand h... (by AbstractionAnon)
Converting references To bool
 
Hi A pointer can be (implicitly) converted to a bool easily: bool convptr(int* p) { /// Equivalent to p != nullptr if (p) /// implicit conv...
[4 replies] Last: i is a global variable, so it is safe to assume that it is implicitl... (by cire)
by alexxx
How to check separate elements in array rows?
 
I am very new at this and I am kind of a self-learner so don't be so harsh , please. I have a task to write a code for the following: Arr ={{1.5, 2.1, -3.5, ...
[3 replies] Last: You'll need to iterate through the rows counting the number of positiv... (by jlb)
c++
 
get Component code while Component code is not 'Q' so this is a tiny section of the Pseudo code i was given but ive just started and i have no clue how to ...
[1 reply] : Maybe it is the code number of the component? char com_code; cin >> c... (by ephraimr)
Using clang directly from the binary download
 
Hi I would like to try clang. My only requirement is to build a few C++ programs. There is a binary download for clang on the clang downloads page (in the se...
[10 replies] Last: Alternatively perhaps I'm missing something here. If you visit http... (by cire)
by xoxos
how to include data in c++? (borland)
 
i'm an *ardent* borland fclt user.. and i've never figured out how to use resource files - there is some dissuasion towards attempting to.. apparently the last ...
[no replies]
displaying the name of the most expensive product
 
Can you help me in displaying the name of the most expensive product ? #include <iostream> #include <string> using namespace std; struct inventory { int ...
[7 replies] Last: @moonman239: You are using uninitialized variable. Product mostExpe... (by keskiverto)
Maps and Bigram Probabilities
 
Hey everyone. First just take a minute to read what the assignment is: https://drive.google.com/file/d/0B-t5ghDb_TCqVzRvNFkycTRjUzQ/view?pref=2&pli=1 I have ...
[4 replies] Last: Yep. That's it. (by helios)
Incrementing multiple times depending on value of command line argument
 
I have to increment the value assigned to portb depending on the value of the third command line arguement by the value of the second command line argument. e....
[10 replies] Last: Thanks for the help! (by Phanboy)
Returning istream
 
It's not exactly a pressing issue by any standard, but as I go (again) through Stroustrup's book, something hit me: if I give members in an istream operator, wh...
[1 reply] : It's done so that you can do things like this for example: std::cout... (by xismn)
Why doesnt it want me to use getline
 
why is getline not allowed here and also whey is the else statement not supposed to be and where do i put the break if i want it to exit the loop if they answer...
[1 reply] : why is getline not allowed here Possibly because getline() only work... (by jlb)
by Skylar
Project Question-Code and Error Check
 
Hello! For a project we are to rewrite a code example from our book and apply the new things we learned. The question we are doing is: This programming example ...
[14 replies] Last: Ok i think i am starting to understand now. I always over complicate t... (by Skylar)
content
 
deleted content - solved
[1 reply] : Also posted here: http://www.cplusplus.com/forum/general/190901/ (by jlb)
by pang
main.exe has encountered a problem...
 
There must be a mistake in my code, but I can't find it. Code Blocks stops whenever I choose search in the textbook... #include <iostream> #include<stdio.h...
[1 reply] : You must pass the address of the variable you want to read into scanf(... (by Zhuge)
Help with parameter of a function
 
Question: what is this string promt my teacher keeps using I just got hired as a firefighter and I would need to take this class again but since I do hope to...
[1 reply] : the thing throwing me off is this "string prompt" crap everywhere in... (by AbstractionAnon)
May 2016 Pages: 1... 1819202122... 36
  Archived months: [apr2016] [jun2016]

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