Beginners - January 2015 (Page 34)

Error checking my menu, stuck on one thing
 
When a user enters a number that is not 1 or 2, how can I make my function restart? I would like my "else if" snippet to restart the menuList function so that...
[2 replies] Last: HAHAHA wow do I feel stupid right now. Thank you. So this is like pe... (by mightymeowth)
Help with the << input in parentheis
 
Im having a very hard time understanding this (cin >> x). Im just getting into c++ and im reading accelerated c++. In the book its a program on making a student...
[1 reply] : The line while(cin >> x) will try to extract a value into the variable... (by jlb)
getting the wrong answer from my counter
 
1
[2 replies] Last: @LB thank you very much, it works fine now (by learning101)
Creating a Login System
 
I'm trying to make a login system with usernames, passwords, and individual permissions as a little project while I learn c ++. After the username and password ...
[9 replies] Last: Anyone (by Tenom722)
Problem with writing to a file.
 
I have been writing scores for a player to a text file using ofstream and it works perfectly however, everytime I run the program, it overwrites the previous da...
[5 replies] Last: From Cplusplus.com open mode reference manual: app All output operat... (by tcs)
SWITCH() ....CASE and putch() problem.
 
(i run windows 32bit, code::blocks IDE as is,i use the default compiler that my IDE has) For both questions 1) and 2) i fail to understand what is going on. ...
[4 replies] Last: Try this (I'm with no computer): #include <iostream> #include <conio... (by iQChange)
Help including a library in a project
 
I'm trying to use the GTK+ library. I'm using Code::Blocks. I chose the project type as GTK+, have the complete package, and then started the project in the GTK...
[no replies]
Program that prints prime factors needs to have them output in a specific way
 
I am working on an assignment to enter a number and print all the prime factors of that number. I have that working, but the assignment demands the output be fo...
[3 replies] Last: Hello? (by keltonfan2)
C++ Primer exercise section 6.7
 
Exercise 6.54: Write a declaration for a function that takes two int parameters and returns an int, and declare a vector whose elements have this function point...
[3 replies] Last: declare a vector whose elements are function pointers. //store functi... (by anup30)
by alexBB
Please explain this C++ statement. Thanks.
 
Hi there. There is a piece of code I do not understand bool CFFT::Forward(const complex *const Input, complex *const Output, const unsigned int N) { if...
[2 replies] Last: Well, if the number N is a power of two then in the binary representat... (by alexBB)
Should I buy a course on Unity 3D in C#, when I'm still a beginner to C++?
 
Hello everyone! I'm just starting out learning C++ for game purposes. I found a video tutorial on Unity 3D, in C# on sale for 10$ instead of 149$. I was wonder...
[1 reply] : Personally I never suggest spending money on learning materials unless... (by kevinkjt2000)
Replacing a string in char array
 
Hello. I need to write a program which replaces a string within a char array. However, there are some boundaries I have to obey. First of all I can't use string...
[2 replies] Last: How could I omitt that. It solved my problem entirely. I appreciate yo... (by sambalsam)
ax3+bx2+cx+d=0 - do.. while | Anyone, help?
 
Hi there, let me explain what i need to accomplish. So my task is to create this ax3+bx2+cx+d=0 mathematical solution with do.. while operator. Task descri...
[4 replies] Last: Very good, thank you, ill let you know the outcome as soon i will have... (by Edvards)
by Dinot
vector of vector and maps
 
So i am reading accelerated c++ and have reached the 7th chapter which is introducing me to maps. In the last example of the chapter the author uses maps to g...
[4 replies] Last: Thank you very much! After rereading the code a couple of times and lo... (by Dinot)
problem in terminating a for loop containing if else statement
 
in the below program the for loop does not get terminated when I enter I,E,i or e. cin>>b; for(i=0;i<10;i++) {if(toupper(b)!='I'||toupper(b)!='E') {cout<<"ente...
[2 replies] Last: thanks :) got the logic. it worked after making minor changes in the p... (by prajwalsingh)
Weirdly Behaving For Loop
 
Here is a snippet of code from my attempt to solve a problem from Project Euler. I expected the snippet to output the factors of 600851475143, but the function ...
[5 replies] Last: uint64_t greatestFactor; uint64_t *listPtr = &greatestFactor + 1; ...... (by dhayden)
pointers practice
 
hello im practicing pointers im not good at using it yet. 1. am i doing it right? 2. isnt it good to put char selection to local scope instead of making i...
[8 replies] Last: I see thank you, I really appreciate you help (by xenovia12)
Using variables cross-header
 
Hello Is there a way to use variables cross-header in C++? Example : main.cpp: #include <iostream> using namespace std; int main() { string...
[7 replies] Last: I see. I get your point there. Okay thank you @MiiNiiPaa you've help m... (by xenovia12)
by elfaze
Debug Assertion Failed
 
Hi, I'm getting this error when i'm trying to start my program: Debug Assertion Failed! Program C:\Windows\system32\MSVCP110D.dll File: c:\program files(...
[4 replies] Last: Thanks a lot. (by elfaze)
extern global static?
 
hey I need some help, i want the veriable "seed" to stay declared and defined throughout the whole program, and I want to define it in the funcion setseed,i als...
[6 replies] Last: thanks everyone, i solved the problem. Aldough we did not do class or ... (by closed account iTkG1hU5)
January 2015 Pages: 1... 3233343536... 39
  Archived months: [dec2014] [feb2015]

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