Beginners - September 2014 (Page 5)

Stack Overflow
 
Hello, I am writing a code for simulations and the population is quite big. I am using VS 2103 C++ and I try to increase the stack with the command /F419430...
[4 replies] Last: If you have 8 GB you won't be able to use it all. The operating system... (by giblit)
simple comparing isn't working??
 
I am trying to convert a string to a int but seems to have some problems using the function.. Anyone who could see what is going wrong? int convertStringToI...
[3 replies] Last: You'll need to post more content, however realize data.at(0) is return... (by jlb)
One problem.
 
solved
[1 reply] : You are missing an insertion operation "<<" between the x and endl. (by squished18)
switch statement/If statements trouble
 
I have nested if statements inside each case. The program runs, however, the only thing that works correctly is the $ termination. When I enter uppercase, lower...
[3 replies] Last: Figured it out, thank you! (by JoJodoggy1)
If and While Preceeding Switch Statements and Clashing
 
I hope you can see what I am trying to do using my comments) the statements/commands are clashing into each other and no matter how I have tweaked things and ch...
[2 replies] Last: I figured things out, Thanks for the help! (by JoJodoggy1)
Print several calculations for a circle given the radius
 
Can you give me some hints as to what I'm doing wrong with this, I'm in a bit of a rush otherwise I could take more time to figure out the errors, it's probably...
[2 replies] Last: I figured things out, thanks for the help!! (by JoJodoggy1)
Factorial function with for loop
 
Here is what I have so far for my part 1 code: It works except it's not calling the main function again in the case I want it to. Psuedocode: Prompt user...
[2 replies] Last: I figured things out, Thanks for the help!! (by JoJodoggy1)
by lestro
Help with streams
 
I'm trying to write a bank program, and I would like to save the accounts that are created and make them accessible by the pin number they chose. The program as...
[no replies]
by hhhr
find last word in a file and count how often it appears.
 
Im having trouble finding a way to make code to find the last word in file, the code should work for every type of file. int main() { string thefile...
[9 replies] Last: my example is case sensitive, a!=A . and punctuation counted "hello" !... (by anup30)
List words of text one-by-one
 
Hello I want to do something, but I'm not sure how to start. If I have text in a text file, example.txt: The example programs of the previous section...
[18 replies] Last: ^Thanks a lot! :) Works like a charm and I fully understand it. Thank... (by Nielyboyken)
by Jhub
showpoint problems
 
At the end of my code why is my showpoint and setprecision not working, it does not display the trailing 0's I need. #include <iostream> #include <cstdlib>...
[3 replies] Last: got it all num needs to be a double No. num0 and crew need not be ... (by cire)
by hhhr
Trouble getting not the empty line
 
This is a function in my program, it needs to get the last line of a file, but some files that i need to run it has empty line as last line so in that cases i n...
[2 replies] Last: it worked :) (by hhhr)
Debug Assertion Failed!
 
I`m executing a program given below...but an error displayed at the beginning Debug Assertion Failed! Program:...dio 2010\projects\cucconi_analysis\Debug\cucc...
[no replies]
Is the following solution correct?
 
Hello, I'm learning C++ from the book "C++ Primer", 5th edition. In chapter 4, exercise asks the following: Rewrite each of the following old-style ca...
[1 reply] : Yes, I agree with you. And, pv = static_cast<void*>(const_cast<strin... (by pezy)
Tic Tac Toe using classes
 
My problem is that the game does not make any move on the matrix that is displayed. Here is my header file containing the TicTacToe class. #ifndef TICT...
[3 replies] Last: Thank you all for your answers. I corrected the problem, don't know h... (by Victor89)
Splaying a splay tree in C++
 
Hi guys. I am quite having a hard time coming up with an solution which determines what kind of splay mechanism has to be used.. Any ideas on how to deter...
[no replies]
by stlund
Inheritance question
 
Hello there fellow geek's. So Im trying to learn thw concept of inheritance and Im wrighting som simple classes of animals. What I have so far is the base cl...
[3 replies] Last: Lets say I make an object shark, then it has to inherit from fish, and... (by stlund)
What does (i & 1) do?
 
I'm trying to understand what the below code is actually doing? I thought (i & 1) would display odd numbers and (i & 2) would display even numbers. But (i & 2...
[4 replies] Last: @hatsack: i&0 is always 0. It wouldn't print anything. (by Disch)
by Ch1156
Can I initialize virtual functions outside a class?
 
I want to know if i can initialize a virtual function outside a class, the function will have a lot of code and I don't want to clutter up my class. #incl...
[1 reply] : bump (by Ch1156)
Big O of a BST recusive size function.
 
Hey guys I'm trying to figure out what the big O of my recurisve_size function would be. For this function would the O be O(n) since the function has to go thr...
[no replies]
September 2014 Pages: 1... 34567... 51
  Archived months: [aug2014] [oct2014]

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