Beginners - June 2014 (Page 40)

Simple program not working
 
dose anyone know why this programs fails to compile? it looks correct to me. i am using gcc to compile on xubuntu #include <stdio.h> #include <stdli...
[3 replies] Last: sorry for being a bit lazy when posting this! should of checked the co... (by tomplusplus)
? Following Comparison Operand
 
Hi cplusplus, first time poster and I've only been really heavily using C++ for the past week or so, so please forgive my confusion with syntax. I'm currently w...
[2 replies] Last: Fantastic, thank you! (by Alpharius120)
Beginner Error C1083 Help please
 
I i'm starting to learn to program but I have already encountered a error when i try to run or debug my code. This is the error message "c:\users\(name)\docum...
[9 replies] Last: It looks as though Visual Studio is not configured correctly. As to th... (by Chervil)
passing unions to functions
 
Can we pass unions to function? if yes then what's the syntax with an example.
[1 reply] : Yes. Union has typename just like a class. Pass with same syntax. (by keskiverto)
throwing exception in operator new function
 
I must create a class with its own operator new. This operator should allocate ten objects, and on the eleventh object “run out of memory” and throw an exc...
[4 replies] Last: class A { static const size_t Alimit = 10; static size_t Acount; ... (by keskiverto)
Convert mathematical operations from string to integer?
 
If I have input string s = "5+3"; and I have to calculate this and return INT which is equal to 8. How can I do that?
[3 replies] Last: But how do I take each number from that string? Either use stringstre... (by MiiNiPaa)
String Library Functions
 
Hey I was just trying out some string library functions and i was doing them on normal strings in the standard library(string str1;) and all of the string libra...
[2 replies] Last: i was wondering if you these functions only work on null-terminated st... (by nicodasiko)
Binary to decimal
 
What is 1001.010(base 2) equal to in base 10?
[2 replies] Last: Thanks (by JasonMcG)
HELP!! Adding multiple arrays into a variable
 
So I've written out a program that is supposed to calculate my grades and give me a letter grade and total point score. However for some reason my getScore f...
[2 replies] Last: int foo ; int bar ; foo = bar ; // ERROR 1. Both arrays have 7 ele... (by keskiverto)
Structs???? Malloc??? Pointers to Malloc and Structs??
 
I'm learning C++ right now and I am having a very hard time understandind structures, dynamic memory, and pointers to the latters. I understand this is how you ...
[5 replies] Last: My general philosophy is that if you are manually deleting, you are do... (by Disch)
Seeking explanation re: trailing &'s and *'s
 
I am very new to C++ and attempting to learn via "C++ Primer" (5th edition). I am encountering trailing &'s and *'s with variable definitions that the book I...
[12 replies] Last: Dear Plussers - Thanks for all the thoughtful replies and insight giv... (by Ortndal)
linked list and classes.... whaaaat??!!
 
So Im working on my final project. aaaaand it is not working. my code worked before but it seems like it decided to stop working. I have to create linked list b...
[3 replies] Last: Thanks for the response yeah the problem was there. I had posID = ''... (by vicalroma)
C++ program using SDL freezes after being moved to a new computer
 
Uh yeah. So basically, I've been working on a game for a while to learn about C++, and I kinda went overboard with the project and made it into something I work...
[4 replies] Last: Hey...uh, well, I just got my new computer, brand new, and I don't kno... (by Somniad)
adding all values inside for loop
 
So the user inputs two integers (for examples 1 and 4) and the output looks like this: +1 +2 +3 +4 which is what I want. Except that I have no idea how to add t...
[2 replies] Last: hey thanks for your help! (by serrld113)
by CDavis
Array with dice
 
So I've been having issues with array's and this last problem really has me. Basicly I need to provide a define constant for how many dice to use and with that ...
[1 reply] : See comments in code: for (i = 0; i < ROLLS; i++) { for (i = 0; i <... (by norm b)
printing a pointer to function & changing return value of the function
 
Hello. I'm studying the topic const. Then i immediately found myself in the topic of pointer to function. I need a help. I want to define a pointer to function...
[7 replies] Last: Yes this perfectly is what i want. The only main difference of your co... (by lovesoi)
Please help debug simple tutorial code
 
I keep getting a result of 2, but what I want is the sum of the two numbers input by the user. #include <iostream> using namespace std; //This is ...
[4 replies] Last: Thanks! Perfect (by turtlesavage)
Median calculation
 
I cannot get this code to execute a median calculation correctly. I know that my problem lies in the nth_element. I am just not sure how to fix it so it works...
[2 replies] Last: One advice to improve your way of working: use a good IDE (for example... (by closed account jvqpDjzh)
Need some suggestions
 
I learned advanced Java in school but always escaped C++.Recently I started Game program using Unity and C#. I found myself a very dumb coder to make anything...
[2 replies] Last: thanks for your suggestions (by mlhazan)
by Auroch
Methods in Class
 
Good day everyone, I've realized hierarchy of classes: Point -> LineSegment. It's necessary to realize the following methods of the class: moving, stretching, r...
[1 reply] : ls.p1 = ls.p1 + dist ; ls.p2 = ls.p2 + dist; you are adding... (by closed account jvqpDjzh)
June 2014 Pages: 1... 3839404142... 48
  Archived months: [may2014] [jul2014]

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