Beginners - November 2012 (Page 20)

Mutiple files return value issue
 
So I am toying with multiple files and learning how to link them together and I have run into an issue I cant locate a solution. So this is as short as possibl...
[2 replies] Last: Almost worked, exept when run the program calls the function a second ... (by CaptnJunks)
string pointer
 
Hey I am working on a problem Rewrite the following function so that it does not use any square brackets (not even in the parameter declarations) but does us...
[6 replies] Last: @Cubbi ...or even simpler, return std::strchr(str, chr); Just m... (by vlad from moscow)
Enum Connection to Input?
 
Hi, I am trying to define a card class for a card game and am having trouble connecting the values provided to the constructor to some predefined enum types....
[1 reply] : Let consider for example enumeration enum Suit {Spades, Diamonds, Club... (by vlad from moscow)
Infinite loop
 
Hi; I have a loop that keeps going. I have a couple functions in this program that exit the function when the user enters 'R'. I have this exit function bit of...
[2 replies] Last: HAHA GOD! Dude thanks. I was thinking I just copied and pasted it wha... (by jlillie89)
Problems with Insertion Sort Algorithm
 
Hello, I have to implement insertion sort for an assignment, and I have an algorithm that aught to work (as far as I can tell), but is giving me trouble. I s...
[1 reply] : Personally, I like writing insertion sort in C++ simply as for (aut... (by Cubbi)
help with strings
 
So I'm trying to make a program to pull the last 2 numbers off a 5 digit number and output the corresponding color with the number.The program won't run and com...
[2 replies] Last: Wow duh! Thanks for pointing out the obvious. Totally forgot about the... (by Showdon)
Variable declaration location gen ?'s
 
Hello all, I am just getting into learing C++, and have a question about variable declaration location in code, and the importance of why they need to be dec...
[2 replies] Last: I was sort of thinking that was it. Thank you, very appriciated. I h... (by CaptnJunks)
Question regarding illegal operand
 
Part of my program I am working on keeps telling me that I am using an illegal operand. Yes it is part of my homework, but no I am not asking you to do it for ...
[3 replies] Last: I would rather not use the pointer. The line should calculate the amo... (by nocoder)
by Nadel
How to change all variables
 
I need some help. Here is my problem. I give a variable a number, and then a bunch of other variables that include the first variable. Well what gets me fru...
[4 replies] Last: Thanks guys, especially you toum. That really helped me out. And most ... (by Nadel)
question with loops
 
Just a simple question, is it possible if given an input of an integer to count how many digits that integer have and assign each digit to an element of an arr...
[2 replies] Last: more than enough thank you! (by Tarek Mohamed)
Help with Sorting Array
 
I cannot figure out why my sorter is bring back the array address for the largest value. If you could please help! :-/ #include <iostream> #include <cmath> ...
[6 replies] Last: I suggested that "i" stops before counter , not count . It's simple... (by toum)
pointers/loop
 
Sorry this is kind of a weird question int* getPtrToArray(int& m) { int anArray = { 5, 4, 3, 2, 1 }; m = 5; return anArray...
[4 replies] Last: Note that int* anArray = new int { 5, 4, 3, 2, 1 }; is not valid ... (by andywestken)
by khal
Question on Friend Class
 
Hi, I have two simple class that I made just to understand how friend class works. I am confused as to why this doesn't compile and also would the Linear class ...
[1 reply] : I'm not an expert on templates but here's what I've got The error com... (by maeriden)
by vRltwE
Compose an array with 2byte+1byte+2byte
 
Considering that an char* array, char* head = new char , must be filled with three values: short start = 0xEB90; // 2 bytes char = 0x02; // 1 byt...
[10 replies] Last: That's a good point. I had in mind integral types and bit shifting in... (by cire)
Converting lower to upper
 
Hello, I'm trying to have a function outside of main check to see if a number is lowercase, and then to make it uppercase if it is. So far I have this but I'm s...
[3 replies] Last: Ok I made changes on lines 30-35. I had two instances of Upper. I also... (by cheshirecat)
Problem With Visual Studio
 
I have the pdf "C++ Programming for the Absolute Beginner, Second Edition". When i copy the second example directly into visual c++ studio 2008 express edition,...
[6 replies] Last: The above code has a bit of a problem. There is no need to use the .c... (by andywestken)
detecting data type the user inputs and closing console within the code
 
am still new to c++ and am trying to make a code that prompts the user to enter a number from 1-4, 5 to exit the program my first question is: how can i detec...
[3 replies] Last: #include <limits> (by cire)
please solve this in easy way....
 
1 232 34543 4567654 567898765
[9 replies] Last: @ Chervil Thanks (by dtaqee88)
Check if a number is a digit or not
 
Hello, I'd like to write a function that checks to see if a number is a digit or not. This is as far as I've gotten, and the program just won't seem to run ...
[10 replies] Last: Thanks for all the help! (by cheshirecat)
pointer
 
Hey i have a function that is supposed to find the position of a max value in an array as well as its value but it keeps getting an error when run does anyone k...
[3 replies] Last: What you want is to modify the pointer's value that is passed to the f... (by toum)
November 2012 Pages: 1... 1819202122... 75
  Archived months: [oct2012] [dec2012]

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