Beginners - March 2014 (Page 6)

Error: collect2: ld returned 1 exit status ?
 
Hello! I'm just practicing using classes in separate files. My output should be "I am a banana!", but instead I get nothing when I run my compiled code. I'm r...
[10 replies] Last: Thanks! :D (by ECEsasha)
Pass a vector of strings to a function without declaring vector
 
I have tried to do what the title says but always getting some errors and a warning: #include <vector> #include <string> #include <iostream> using na...
[2 replies] Last: Ok. Thanks. (by dleanjeanz)
need help...read data from a file
 
my code is working somehow...but it stops at " Gunn ", and then the .exe file has stopped working....can u guys help me to fix it?? ^.^ the data in the file...
[2 replies] Last: thank you..it works perfectly (by passw0rd)
tic tac toe game
 
Hey, so i've started a tic tac toe game. On line 21, "functgame(userinput01,char board ;)" i get the following error: error:expected primary-expression before ...
[4 replies] Last: thank you very much. i dont quite understand that but thanks (by josepho16)
Classes in separate files in Gedit?
 
I'm having trouble with using a class in a separate file from main.cpp. I learned from a tutorial using Codeblocks and the instructor created a new class and it...
[2 replies] Last: Oh! I completely forgot about that. Thank you so much! I feel silly :D... (by ECEsasha)
by rbaral
Access variables defined in header file of another project
 
I have multiple C++ projects in a single solution. I have correctly defined the Additional Include Folders... settings for the project which needs to access the...
[1 reply] : Just like normal. Note, however, that you need to define the variables... (by TwilightSpectre)
Fixed point iteration help
 
I'm trying to write a C++ program to implement a fixed point iteration algorithm for the equation f(x) = 1 + 5x - 6x^3 - e^2x. The problem is, I don't really kn...
[3 replies] Last: Integer to an Integer power pow is not as accurate or as fast. Anywa... (by giblit)
Invalid Operands?
 
My programs goal is to input a binary number and output a decimal one. The textbook told us to base it off a previous excersize so I did. It is below. #...
[3 replies] Last: Constant variables cannot be modified. Simply remove the const quali... (by Daleth)
Please help me with Fibonacci #
 
Wow... ive been working on this for three hours today. I admit, my math is lacking... but I didn't think it was this bad. Please excuse all my extra variables. ...
[2 replies] Last: I'm pretty sure "doubles on the fifth" is for setting up initial condi... (by Daleth)
by Mido14
* shapes
 
how to get this output but in same level with explanation please * *** ***** ******* ********* * *** ***** ******* ********* ...
[4 replies] Last: Instead of having two separate outer for loops to control 2 sets of ro... (by wildblue)
OpenGl Suggestions! How can i achieve this:
 
So, I am a beginner C++ programmer and i am creating a game . I want to achieve that when a character press space, it will direct him to level 1. But how do i d...
[no replies]
All i get for ouput is 1's and 0's -Arrays
 
So I'm writing code for a virtual battleship game. The ships need to be placed randomly and can not overlap. The ships are placed by their "bow" and then are i...
[no replies]
by mjlohr
program help
 
Could you please help me with this program? A car rental company uses the following table to help compute rental fees. TABLE 9.3 Car Type Rate per Da...
[no replies]
Matrices set precision
 
I wrote a code to perform a matrix operation but I need to set the precision to 3 decimal places for the results. I'm having trouble doing so because I'm not ge...
[no replies]
Efficiency question
 
Hi, just want to know which one will be faster, vector<int> temp; temp =temp[n+1]; or vector<int> temp; if(temp !=0) temp =temp[n+1]; ...
[6 replies] Last: > move everything no matter what the value is or make a if statement w... (by JLBorges)
whats my error here
 
I have an error coming up on the couts on line 15 and 16 what is wrong here. Also if you see something wrong in my program you can always tell me :) #incl...
[7 replies] Last: our professor wants us to use two functions named line and rectangle..... (by owenkmc)
Inheritance
 
Is this correct so far? QUESTION: Create a base class called Vehicle that has the manufacturer’s name (type string) , number of cylinders in the engi...
[no replies]
by mjlohr
Help with errors
 
Can someone please help me fix the errors in this code? #include "stdafx.h" #include <iostream> #include <string> template T Square(T value) { retu...
[1 reply] : Your compiler errors didn't help? template T Square(T value); ... (by Daleth)
Dungeon Crawler Monster Problem
 
Hi, I already posted another topic about this program, but since then, I have done more work on it and added monsters into the program. This completely messed e...
[11 replies] Last: I see, thanks for the help! (by Jamerack)
chars and their order
 
how can you pull in a single char from a file and then figure out what number it is in the alphabet and in the word?
[3 replies] Last: Just like you would get a word from the user. C++ file streams are des... (by Daleth)
March 2014 Pages: 1... 45678... 79
  Archived months: [feb2014] [apr2014]

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