Beginners - June 2016 (Page 16)

array resizing
 
hey guys I read somewhere either this site or a c++ that you cannot resize an array once you created it but in this code below I was able to resize the array wi...
[14 replies] Last: thanks guys (by adam2016)
TextAdventure Game Constructor Confusion
 
Everytime, in my TextAdventure program (that can be found on github here; https://github.com/Hirokachi/TextAdventure/tree/RandomMapEnhancement ) that I write a ...
[4 replies] Last: Ok thanks. -Hirokachi (by Hirokachi)
Visual Studio: Error C2679
 
I am making a function that holds a vector of references. When I try to cout the references: int works fine, but if I output std::string I get the error 'error...
[no replies]
so confused with this example.
 
hi guys I'm reading Alex Allains jumping into c++ and so far I must admit it's a pretty good book with great explanations up until this point which is why I'm a...
[6 replies] Last: I didn't know you could use a pointer as a return type? But you did... (by AbstractionAnon)
User input file name (FSTREAM)
 
So I want the user to input the file they wish to open but for some reason after I input the file name "new.txt" it doesnt open. But if I simply write "new.txt"...
[4 replies] Last: [quote=Handy Andy]Try removing the .c_str() from file.open() statement... (by AbstractionAnon)
Drawing Pyramids
 
I want to draw pyramids near each other in the same lines but I only know how to draw it under each other. Here is my Code #include <iostream> using nam...
[6 replies] Last: I made this code , But the problem here is that the code is drawing th... (by amm2100)
Pull input from a folder rather than a specific file
 
I'm not too sure if I can do this, so I thought I'd check it out here to see if it would be possible or not. I would like to pull a file from a folder instead ...
[2 replies] Last: Did you mean something like "monitoring a folder"? http://stackoverfl... (by closed account 48bpfSEw)
Multiple definition of error
 
This might be really stupid but I am just starting. Was trying multiple files. Here is the code: Menu.cpp #include<iostream> #include "Guess the no....
[2 replies] Last: That helps, thanks chervil! (by Abhi589)
by mpd74
Unwanted Variable Change in While Loop
 
Hey guys, I'm struggling hard with this one. I'm working on a cache simulator for one of my classes and I'm having an issue with variables changing by themselv...
[2 replies] Last: SOLVED: Ahhh, that was absolutely it. I was having a similar "proble... (by mpd74)
by koopey
'val2' was not declared in this scope
 
i am getting this 'val2' was not declared in this scope error when i think it is declared. //part of the code int evaluatePostfix(string& exp) { ...
[6 replies] Last: @coder777 thanks! Crushed it! @Chervil actually, my "push" function ... (by koopey)
by koopey
infix to postfix conversion
 
tyring to find the bug for last 1.5hrs. can't find whats wrong! overlook the cout statements that i used to trace the bug.right answer: abcd^e-fgh*+^*+i- wha...
[9 replies] Last: @kemort yes that's my post again but,..." what do you mean....tu du d... (by koopey)
by Rholar
Using fstream to open a directory and grab file names. Possible?
 
I am making a virtual machine and i need to open a directory (progs/Input) that holds all the assembler .s files. Once the directory is open i need to get the n...
[3 replies] Last: Well i gotta change my code a bit then. Shouldn't be too hard. Thanks ... (by Rholar)
Using graphics.h with VS 2013
 
Hi all, I'm trying to use the graphics.h library (which is know is long out of date) for some exercises I found online. I'm trying to install/ incorporate it in...
[5 replies] Last: You may put the files in any directory you want. Just add them to the ... (by coder777)
Best IDE?
 
I tried Code::Blocks but it doesn't work right. I can't work with seperate files in it, the button to do so doesn't do anything on clicking. So would love to t...
[9 replies] Last: http://stackoverflow.com/questions/32345925/how-come-c-project-in-visu... (by closed account 48T7M4Gy)
storing a string as a seperate vector of characters
 
Im writing a function that returns true if a wordis a palindrome or not. (spelled the same backwards and forwards like racecar and tacocat). My approach to this...
[1 reply] : Assigning a string to a vector: http://www.cplusplus.com/reference/ve... (by coder777)
Finding The Maximum Vaule Array
 
I need to make a program that lets the user input a bunch of numbers using an array that contains a function " ( int mymax ( int array , int numofelements ) thi...
[5 replies] Last: Oh okay, thanks, this helped me a lot! (by bardo99)
Help with Arrays
 
Hey guys, I am trying to figure out how I should be getting my program to say "The least/most rain fell in (Month) with ___ inches." I have everything, but I ca...
[1 reply] : cout << "The least rain fell in " << Months << " with " << driest ... (by closed account 48T7M4Gy)
"while" loop problem
 
the "while" continues to make the program loop when the correct answer is stored. How would i fix this? #include <iostream> int NumberGame(int x) { ...
[2 replies] Last: Thanks for this, didn't even cross my mind to use bool. (by NEWxGUY)
'Undefined reference to' error
 
Hi, I recently started learning C++ and encountering some errors. I use Code::Blocks as my IDE. While trying seperate files, something goes wrong. This i...
[9 replies] Last: Yes (by Abhi589)
by osinp
srand and rand
 
Hello everyone, I am a beginner with C++ and I am unsure of where to use srand() and rand(). So what I am trying to do is have srand(time(0)) in my main ...
[1 reply] : http://www.cplusplus.com/faq/beginners/random-numbers/ (by Duthomhas)
June 2016 Pages: 1... 1415161718... 25
  Archived months: [may2016] [jul2016]

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