Beginners - February 2014 (Page 32)

Help needed with assignment C++ (Beginner level)
 
Hey guys ...I'm in Computer science class that i need for my engineering major. We went over basics of computer science, and below is the assignments that our p...
[3 replies] Last: @ak16 Thanks! i have nt learned to do it this way.Its works great! Tha... (by vikramlucky)
C++ DirectX Accessing a Vector through a method.
 
I want to access a vector through a method. How do I do it without having to access the individual floats? Is there a way to access this float through only the...
[4 replies] Last: ^ I did end up creating a reference to the object and it worked. I j... (by Yoshimiii)
by Yeti86
Review of first program
 
Hello everybody, I start c++ coding with a program for scouting a sportsgame. Therefore I developed a class Player with different methods. Now I want to cre...
[6 replies] Last: Thanks again very much! (by Yeti86)
by zakkor
Can anyone give me an example of a template method used inside a class?
 
I am obviously doing it wrong because I am getting all sorts of errors here: template<class T> class Game { private: //Game-related T pro...
[5 replies] Last: I'll try this out. By the way, is there any problem if i keep the func... (by zakkor)
I tried throwing an exception class that I made. Why does it say I have an unhandled exception?
 
Unhandled exception at at 0x76C24B32 in exception_project.exe: Microsoft C++ exception: ProductionWorker::InvalidShift at memory location 0x001CF8A3. This ...
[4 replies] Last: How would you display pw if it never finished getting constructed? Wh... (by Stewbond)
Function Trouble
 
This is probably a long shot but I'll ask anyway because I can't figure it out. #include "stdafx.h" #include <iostream> #include <string> using nam...
[1 reply] : This is because the getine() on line 93 will just eat up the newline... (by TwilightSpectre)
Cant display the right number of lines
 
This program is supposed to take a file name entered by the user, open it, and display the first 25 lines. When I run the program it displays all the lines in ...
[5 replies] Last: Thanks all! ne555 your link was very helpful. I just needed to insert ... (by Khillz3000)
Empty Function Not Working?
 
Hello there, I'm trying to detect when the enter key is pressed to break an input loop as follows: int main() { string words ; int i = 0; ...
[6 replies] Last: cin >> anything; will gobble up any leading whitespace, so you won't... (by long double main)
by Makfly
Function with Strings Confusion
 
I'm writing a function to trim leading and trailing white space from a string. It should leave any blanks there in the middle. Unfortunately the program crashes...
[2 replies] Last: Thanks so much, I've gotta pay attention to these things! (by Makfly)
Data not being passed properly?
 
Okay, everything is compiling and running. It seems that my problem is that circleType.h isn't being passed to cylinderType.h since the main isn't producing pro...
[2 replies] Last: Ahhhhhh. That makes sense... That solved the problem! Thank you! (by cphipps)
AVI files?
 
I was wondering, does anyone on here know anything about writing to an AVI file? I am interested in maybe writing a program that can take image files and create...
[no replies]
passing char from one char array to another
 
I keep getting the error footballA2.cpp:290:36: error: invalid array assignment winningteamnames = shuffledteamnames ; ^...
[1 reply] : You cannot assign one array to another. If they're c-strings, use st... (by cire)
french/english dictionary read file problems
 
My girlfriend put this code together for a class to create a french/english dictionary. I'm not good with the char stuff as I never deal with chars or open file...
[no replies]
by whilom
No matching function in Calculator Program
 
I am trying to make an infix calculator but I keep hitting a problem saying: error: no matching function for call to ‘val_in(token&, std::basic_string<cha...
[4 replies] Last: Apparently forgot to put the return in the function. Now it works. Tha... (by whilom)
Problem when compiling
 
Hey guys, so I have another assignment and I've got it all ready to go, but when I try to build it, I'm getting an unresolved external symbol error again. I'm n...
[2 replies] Last: Thanks so much! I added Person::Person() { age = 0; } to my implementa... (by SHUTitDOWNx)
Difference in efficiency between pointers and nonpointers
 
Is there any difference? I read somwhere that memory allocation was expensive. example: string *temps(new string("Hello World")); cout<< *temps<< end...
[6 replies] Last: Nothing's stopping you from testing it yourself (aside from the errors... (by cire)
A simple GIF decoder
 
Hi! I decided to write a simple GIF decoder just for fun. I have read the specification of this format and now I am quite familiar whit LZW etc. But I have ...
[1 reply] : You can use OpenGL. See http://stackoverflow.com/questions/4837098/gif... (by iQChange)
by mnvrz
Help with branching if statements
 
Hello. I am new to learning C++ and I am writing a program that runs several mathematical equations using branching if statements for school. This is the code I...
[1 reply] : It looks like you need to put the if argument into parentheses. Line ... (by BreezedStars)
Parenthesis Check using Stacks
 
i keep getting the error -Error 4 error C2447: '{' : missing function header (old-style formal list?) Warning 1 warning C4018: '<' : signed/unsigned mismatch \b...
[no replies]
Compiles, but turingscraft still wants something else
 
I have written a code snippet program for the following question, and it compiles, and executes just as the directions ask, but apparently it isn't formatted li...
[3 replies] Last: This on the heels of a chapter that insists that input should always b... (by justin00)
February 2014 Pages: 1... 3031323334... 60
  Archived months: [jan2014] [mar2014]

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