Beginners - April 2014 (Page 55)

by iluv41
subscript requires array or pointer type??
 
I have this but there is the c2109 error: subscript requires array or pointer type on the '[(' part of the code and i cant figure out why. This is where the er...
[1 reply] : It means that alpha is not an array or pointer (by ats15)
Slot machine, payout random generator.
 
Thank you.
[8 replies] Last: Yes exactly, anyplace between where you get the bet and the start of t... (by admkrk)
Binary File I/O Issues
 
Hello! I'm having some issues with binary file I/O. I've never used it before and I'm having some trouble. I've got a cpp file with my main function, then I've ...
[7 replies] Last: Worked, as expected. Thank you again. (by darkcammo)
Function issues
 
I am having some issues with functions and I have looked at a lot of websites that try to explain it however I just am not getting it. Mine is having issue and ...
[4 replies] Last: xismn, Thanks for your reply. I have been studying what you had to sa... (by MRangel)
Total Running Cost and Enum data types
 
I have to write a program that takes in a product name and cost, then outputs it and also outputs the total running cost, unless the user input was q. My teache...
[2 replies] Last: @nvrmnd It's working, thank you very much I was getting really frustr... (by presidentejay)
Any way of merging char and string w/o c_str?
 
Precisely what the question says :) Is there any way to append a char to a string without including c_str ?
[1 reply] : You cannot append a char to a string using c_str . http://www.cplusp... (by cire)
Functions & Switches
 
Im working on an assignment for school, and Im having trouble grasping the concepts of functions fully. The idea of the program is to run a menu based program...
[no replies]
Namespace exercise - Compiler Error?
 
Hello, I'm trying to complete an assignment that demonstrates namespaces. I have read the book and searched online, and cannot figure out why this won't compile...
[1 reply] : Your (multiple) definitions of f and g do not reside in the namesp... (by cire)
getting the wrong answer
 
OK so i finally got the programm to open and work (sort of...) but my new problem is that the answer that i am getting is completely in correct and no were near...
[1 reply] : > the answer that i am getting is completely in correct in those cases... (by ne555)
by fiodis
Pointer juggling
 
I'm running into an access violation error that I can't seem to resolve. I have a class called Scene, a class called Entity, and a struct called Group. A Scene...
[no replies]
Why don't I get the result I want?
 
So my question is, why am I getting the wrong output at the end of run time? I've been practicing my C++ coding and I wrote the following program, but for so...
[2 replies] Last: OOHH ok, that makes sense, so I have to declare strings not integers g... (by MidnightCandleX)
reading files
 
I am trying to read a file with format below. They are info of students. Data fields are separated by the percent (%) character. How do i make the program read ...
[3 replies] Last: Yes, there is the string::find and string::substr method. Although, I'... (by Smac89)
Student Directory Search/ Ifstream C++
 
I am trying to read the prog8in.txt file so I can search through roster using an ID # or a Last Name but I cannot get the program to read my .txt file correctly...
[6 replies] Last: Thank You! That's just what I needed, I think I'll be able to finish i... (by barnold)
Array Loop Help
 
Part of my program needs to allow the use to input their birthday in the format MM/DD/YYYY then convert it to the format for example April 6, 2014. I tried this...
[1 reply] : For one thing, birthday will be equal to 1 for January and November. ... (by admkrk)
directx 11
 
I come to this forum hoping for an answer or to be directed to a site that will help. My environment: windows 7 Visual studio c++ 2013 express The co...
[no replies]
passing ifstream object as a function parameter
 
I am getting error messages with my code and im not sure whats wrong. The ones I am getting are: projects\hw7\hw7\hw7.cpp(53): warning C4305: 'initializing' ...
[1 reply] : Line 28: Exceeds the value that can be stored in a long (implementati... (by AbstractionAnon)
Desperate for help!
 
I'm in need of assistance for this homework assignment I'm on. Unfortunately my teacher has ignored my message requesting assistance so I'm on my own. The lab i...
[4 replies] Last: That's the thing, I'm not all entirely sure of what I was doing. The e... (by sierranm)
by doc17
help my array
 
I want my code to look like with * as each value for the array { * * * } { * * * } { * * * } c...
[1 reply] : for(int row = 0; row < rows; ++row) { for(int column = 0; column ... (by giblit)
test what tile character is on
 
So what i would like to know is when the user presses an arrow key how do i check what tile the character will be moving to. if the character is on a 0 for g...
[no replies]
expression must have (pointer-to-) function type
 
This seems to be a silly one for most of you. But please help me: I am trying to get perimeter of rectangle and getting "expression must have (pointer-to-) f...
[2 replies] Last: @cire: Thank you so much. That worked!! (by goodfellowtodd1)
April 2014 Pages: 1... 5354555657... 67
  Archived months: [mar2014] [may2014]

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