Beginners - September 2014 (Page 51)

How do I initialize a string name for the description of an array?
 
It says that Infantry and Bazooka and everything is not declared in the scope, I made it global variables. I know im missing something small, please tell me wha...
[1 reply] : Use quotes for literal text. "Infantry" etc. (also global variables... (by Chervil)
evaluating an expression of signed and unsigned types
 
hello everybody....could you explain me what happens exactly in this expression ? unsigned int j = 10; int k = -42; std::cout << j - k << std::...
[2 replies] Last: #include <iostream> #include <iomanip> int main() { unsigned int... (by JLBorges)
by Sh0Ti
Problem with deleting codes
 
So, I got this annoying problem - some sort of automatic deletion which for the more experienced people might be nothing but for me ..well i just cant delete or...
[2 replies] Last: That solved my problem. Thank you, very much! (by Sh0Ti)
rand() - From A to B
 
Hello I'm already familiar with the Rand() function, rand () % 50; But how exactly would I do these: -Make rand() only use numbers from 5 to 10 (5,6,7...
[4 replies] Last: @Lorence: That would cause a non-uniform distribution. 7 or 9 would be... (by TwilightSpectre)
Super nooby question
 
I'm needing for it to read as "blank" "blank" "blank" by Blank" but it will only let me compile to show "blank" "blank" 'blank' by Blank" ??? (I changed th...
[3 replies] Last: thanks, that's all I needed (by evanpowers)
array
 
which is more readable? int anArray ={1,2}; or int anArray ={1,2};
[5 replies] Last: okay thank you (by xenovia12)
Unsolvable error
 
hey everyone. so i've been struggling with this out of space error for the last 6 hours can any one heeelp please ... main.cpp #include <iostream> #...
[6 replies] Last: how do you issue the command to compiler I prefer GNU make (or bette... (by keskiverto)
What is this function called?
 
I'm doing a practice problem that asks what foo(dat, 7) returns, and it also asks what this function is called. As far as I can tell, it finds the smallest valu...
[3 replies] Last: Small correction to line 8: std::cout<<foo(dat,7); (by ShodanHo)
help with static members of a class
 
Hi, I am trying to make a simple program with a "House" class to learn how to use static members of a class. The idea is to get numberOfHouses to equal 2, and b...
[3 replies] Last: Well initializing a variable outside of a class doesn't necessarily me... (by giblit)
by Gyzmo
Removing a carrage return from a string of data
 
I have a string of data that ends in a line feed (0x0A), I need to send it out on a serial port without adding the extra carriage return and line feed attached....
[1 reply] : What's a "command option"? The preferred answer depends heavily on whe... (by Computergeek01)
new question about sort
 
Define a function void order(int & a, int & b, int & c, bool ascending) that places the values in ascending or descending order, depending on whether t...
[4 replies] Last: i know, it is the sign... damn it (by passw0rd)
issue with "this" pointer
 
Hello, I have created the following program to find the area of a circle using the this pointer for an object. #include <iostream> #include <cmath> using...
[5 replies] Last: Oh... I see now. Sorry, I think I programmed a setArea function instea... (by heyyouyesyouiloveyou)
Display English words (CurlPP)
 
Hello I first asked this question here: http://www.cplusplus.com/forum/beginner/141021/ But thought it was worth to make another thread for it. Someone sugges...
[12 replies] Last: I've been as precise as I can without figuring out how to do it myself... (by Lowest0ne)
by h4ever
Undefined reference
 
main.c #include "types.h" #include "gaussian.h" #include "args.h" #include <stdbool.h> int main ( int argc, char *argv ) { double units; ...
[14 replies] Last: > ¿why would it add an underscore? Don't ask me; ask the people who ... (by JLBorges)
by moufou
problem with "while" and cin.get
 
Hi i'm currently doing a homework(I know that you will not give me the answer nor do i want it). What I have to do is to count the total of positive/negative nu...
[2 replies] Last: thanks for the reply! yes exacly i was trying to compare what i enter ... (by moufou)
September 2014 Pages: 1... 495051
  Archived months: [aug2014] [oct2014]

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