Beginners - March 2016 (Page 24)

by Musica
Strange output using for loop
 
I added(push) 4 items in a stack, right. Then, I wanted to remove all the items using pop function. ...
[1 reply] : There is double counting here: for(int j=0;j<trivial_stk.size();+... (by Chervil)
Weird Errors
 
Hello, I am writing an evolution simulator, but I recently came across a lot of error codes. The pro...
[4 replies] Last: Thanks very much. I would never have thought that the errors came from... (by AmazingBKaiser)
Dangling pointer?
 
#Moved to General C++ Programming I think I have a dangling pointer here, causing SIGSEGV Segmentati...
[4 replies] Last: Just a brief comment. The while(buffer[sentence_end+1] ... etc. that... (by Chervil)
passing objects as arquements
 
Hi everyone,I'm new to c++ and have a question about passing objects of classes to arquements I thou...
[17 replies] Last: how come I can pass the address of error in to the catch parameters w... (by AbstractionAnon)
divide by zero exception
 
Hi everyone,I tried to catch an exception which works for about 2 seconds but then the program still...
[4 replies] Last: thanks AA =) (by adam2016)
enumerations??
 
Write a program which makes use of enumerations. Define enumerations types and use them in code. To ...
[5 replies] Last: Does your textbook really not explain what enumerations are? (by MikeyBoy)
by Areey
Base and exponents
 
how to write this line? e=y^2+y^4+y^8. I tried this but it doesnt do the job int main(){ ...
[1 reply] : how to write this line? Depends what you mean by "write". Your code... (by Chervil)
Explain how this works
 
Hi, I have been reading C++ Primer 5th Edition and I am stuck on Exercise 1.23. I found the code ...
[7 replies] Last: #include <iostream> #include "Sales_item.h" using namespace std; in... (by tipaye)
Re-enter a user input
 
This is a portion of my code for a game. If the user enters a number > 9 it does cout the response h...
[10 replies] Last: Try reorganising your code, it seems very bloated to me and you make s... (by megatron 0)
by Areey
Base and exponents
 
Write your question here.
[no replies]
variable changes itself or I'm an idiot (probably I'm an idiot)
 
I was messing with this code but it just won't work. The code should convert every letter I type in...
[4 replies] Last: Thanks! (by newUser3940)
by Gr1m
Reading all the data from a file
 
I know how to read data from a file using fin using a given amount of variables, but I want to know ...
[4 replies] Last: If it's a text file, I think the simplest way is std::string::getline... (by s8050)
Help Clearing Array!
 
Hi, so I'm pretty new to C++ and I have an assignment where I have to loop the whole program and whe...
[4 replies] Last: while (userInput < 1) { static float *scores = getScore(); I think... (by tipaye)
by Bopaki
A question on linked lists
 
Write your question here. How come that 1 program gives 2 different outputs? Put the code you...
[6 replies] Last: I did that and it worked. Thanks very much sylphsang (by Bopaki)
writing in files issue
 
Hello, Well the program below is absolutely useless. When I execute it I create a file with the n...
[6 replies] Last: Regarding the #include . Often one header may include some or all of... (by Chervil)
Bubble sort
 
I'm faced with the task of having to use a bubble sort on a text file that contains multiple individ...
[2 replies] Last: Thanks for the link Rafael (by JLop0820)
How does a char array work?
 
Can you explain this line code? char map ={ "###################", "# ...
[2 replies] Last: I only usually see one set of brackets why does it have two? It shoul... (by kbw)
random/logic help
 
Hi guys every time I run my code my random function generates the same numbers (like 6/8, 12/11) doe...
[2 replies] Last: http://www.cplusplus.com/faq/beginners/random-numbers/ (by Duthomhas)
by s8050
Pointer of a two dimensional array of variable dimensions?
 
Hi, I have some problems with multi dimensional arrays. I though that in the same way we point to a...
[5 replies] Last: Thanks guys! now I got it; regarding the dimensions of the array, memb... (by s8050)
Better form of flow control
 
I'm not sure there is an absolute correct way of doing things and it probably depends on context, bu...
[6 replies] Last: Thanks keskiverto, you make some good points. How many code points c... (by Bogeyman)
March 2016 Pages: 1... 2223242526... 47
  Archived months: [feb2016] [apr2016]

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