Beginners - February 2013 (Page 59)

by tpinon
getline and cin ??
 
I'm stuck in a loop (lines 35-45). I just put a system PAUSE there to see where it was falling through. Is there an issue with a return character in the buffer?...
[14 replies] Last: Sorry for not specifiyng. I was refering to the main loop. To change... (by nedo)
STL List Sorting (1,2)
 
Hello guys. I encountered a problem when trying to sort my STL list. This is my following code case 3: { /* Prompting for user input of price range ...
[20 replies] Last: That won't let you sort by a different value. You need to use a lambd... (by LB)
char * enigma
 
Hello :) I'm trying to understand how char* works. I searched all the day but I couldn't find a good explanation... When creating a pointer you initialize it ...
[1 reply] : First, let's make it valid C++, const char *p="troll"; There are se... (by Cubbi)
by JakOrp
help with void functions
 
hi i know im calling these functions incorrectly in some way, but shouldnt my first two functions in main call correctly? sorry if this seems trivial! #incl...
[2 replies] Last: so I am begginer too but things i see are 1) you need to put brackets ... (by mirec)
by mpack
Finding a prime number
 
I am very new to C++ and trying to create a code that allows me to see if a number is prime or not. I think I may be on the right track, but, when compiled and...
[3 replies] Last: You are using a while loop when I think you mean to use a for loop. (by randisking)
Can not get prime function to work..help please
 
Hello! This program is suppose to get a whole number input from the user and say weather that number is prim or not. I can not get this program to work proper...
[16 replies] Last: Got it!! Thank you!! (by bruntmjust)
Why there is IF() output every time?
 
#include <iostream> int main(){ char c; while(c!='x'){ std::cout << "Enter c: "; std::cin >> c; if (c!='1' || c...
[2 replies] Last: Thanks! (by nsashans)
Divide and conquer problem
 
#include <stdio.h> #include <float.h> #include <stdlib.h> #include <math.h> // 2D Struktur struct Point { int x, y; }; // Das Array wir...
[2 replies] Last: I agree with coder777. I tried it with 7, 10, and 15 points (with dif... (by aperio)
Overloading the << operator
 
I'm having a few problems trying to overload the << operator for the point class. I need to be able to store points in the form (x, y) in a vector. Any ...
[1 reply] : This should help: http://www.cplusplus.com/forum/beginner/11449/ (by Lowest0ne)
undefined reference
 
Hello forum, I have included the following class file which is located in another directory. The Makefile specifies the inclusion path to the file . But i ge...
[3 replies] Last: You are not linking against `glutils.o' (by ne555)
Have a small problem with my insertion sort
 
I have a really small problem with my insertion sort and I cannot figure it out. my program is set up to take an unlimited amount of random values as input a...
[3 replies] Last: When you declare the array, you need a size. You should bring the dec... (by Lowest0ne)
by jcagro
string replace problem
 
Hi ! I'm new in c++, and this is my first post... Please be clement :) I need to build a little programm which receive a Windows path (by command line arg...
[4 replies] Last: Ouups, yes you're right. I read too quickly the post I mentionned (htt... (by jcagro)
Borlnad C++ eroor with if
 
Hi! I have a problem in borland (i am new to borland, before i worked in dev c++ and codeblockxx) with the "if". #include <iostream.h> void main(){ int m, n, ...
[3 replies] Last: i am new to borland, before i worked in dev c++ and codeblockxx Soun... (by Chervil)
Void?
 
Hi, sorry for asking such a basic question, but when is it necessary to use void? I have a book and it says very little about void except in a table on data a...
[5 replies] Last: The return statement can be especially useful if the function may ex... (by Chervil)
by Ch1156
Class help
 
Ok so i have my class that im making for a game in CryEngine, and i have 2 mechs and each mech is supposed to have its own stats but i cant seem to ge tthem to...
[11 replies] Last: I have a suggestion for you, go to sfml-dev.org, see the documentation... (by bandicoot360)
What is wrong with this code...
 
Hi, I cant figure out on what is wrong with the code I have made. Anyone can help. I am getting error while compiling. 'ABC' undeclared(first use this fun...
[3 replies] Last: Hi TheIdeasMan, Appreciate your response. With regards to ABC & buy,... (by MarcusFenix)
Do while loop ignoring 2nd else if
 
Hey guys, I wrote this code and it compiles but when I go to test it, it does not do any of the options except withdraw and ignores the while loop. Any ideas o...
[4 replies] Last: In this statement if (userInput == "w" || "W" || "w*" || "W*") e... (by vlad from moscow)
Need help with cin
 
I have this function : my_class card_input ( ) { int n ; string c ; char cstr ; my_class card ; c...
[1 reply] : Make n = 0; when you got some_other_object == card ; .... (by HiteshVaghani1)
by Ch1156
Emulate server login code
 
Ok so here is my situation i am going to be moving very very soon, and the CryEngine 3 free SDK needs you to login every time you start it up. I wont have inter...
[no replies]
by ckw77
Help with Craps.. Still not Understanding
 
We must create a craps game... The teacher suggest we use the following as a plan to attack: 0. Use two global variables to represent the dice. 1. Define l...
[no replies]
February 2013 Pages: 1... 5758596061... 67
  Archived months: [jan2013] [mar2013]

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