Beginners - June 2013 (Page 23)

Confused about what a template dose
 
I completely don't understand any thing about templates. I read books on C++ to help but i just don't get what are they for and how to use them i thought they w...
[3 replies] Last: Templates enable code reuse, by allowing a function or class to work w... (by nkendra)
Calculator
 
Hi all! I want to make a calculator that calculates the product between two numbers, but I can't solve it. This is the way I would like to make it: #include ...
[1 reply] : Sorry, just figured it out! (by Isengardium)
String or int as part of variable name
 
int n = 9; while (n > 0) { Question???.ask (); }; Can I replace ??? with the value of n to avoid having to write out Question.ask a bunch of times?...
[18 replies] Last: No worries - glad you managed to find the problem. (by MikeyBoy)
Reading some lines with diferent variables
 
Hi!! I'm new here and new programming in C++. I'm doing a program that I need t read from a file some information. That information consist in a level nu...
[12 replies] Last: Hi... Sorry for the late reply. Thanks all for your help. I already... (by Nuno Santos)
How to change returntype of function during runtime?
 
Hi all, I am currently a beginner in C++ and I have a doubt. Suppose I have a function which check for some conditions and if a condition is true, then it ret...
[7 replies] Last: @andywestken Thanks for your precious advice. :) -Himansh (by Himansh)
Help with fscanf()
 
I feel like I'm missing something. I'm working on a basic simulator for school and I've been playing with fscanf() as a way to read an ini file. I know there is...
[6 replies] Last: I'd like to point out that since you are using C++, you shouldn't be m... (by Duthomhas)
by Blank
adding two random numbers..
 
i need help...this is what i have so far.. Write a program that can be used as a math tutor for a young student. The program should display two random num...
[1 reply] : quite a relevant example here: http://www.cplusplus.com/reference/cstd... (by mutexe)
Reading txt file in to an char* array.
 
Write your question here. Put the code you need help with here. #include <iostream> #include <fstream> #include <stdlib.h> using namespace std; ...
[10 replies] Last: I didn't log in in the weekend, so you might have completed it. Here i... (by tath)
by Imme
Word Guessing game!
 
I need to write a program which receives a word with 4 letters from the user (not necessarily meaningful) and then it disarranges the 4 letters and gives you th...
[1 reply] : Read and Learn only then you can earn ;) i mean points in exam. I th... (by ErrorFree)
SDL Init problem
 
Hi. just want to link and init sdl library to project. do all steps from http://lazyfoo.net/SDL_tutorials/lesson01/windows/msvsnet2010e/index.php download ...
[3 replies] Last: You have to link the include folder, the lib folder, and then put the... (by giblit)
Pointers to functions
 
I am working on a class that only has one function that is public and that is the initial call for the end-user. The initial call for the end user would be, for...
[2 replies] Last: If you're using C++11, it's a lot easier to use function objects: #... (by Disch)
by giblit
Simple compiler/langauge
 
I am trying to make a simple "language" and compiler that will let me do a "hello world" project and I have a few questions. Here is my syntax BNF STANDARD ...
[15 replies] Last: Like a normal windows. Also yeah under the flags I have c++11 enabled.... (by giblit)
by send
No matching function for: insert
 
Write your question here. #include <string> #include <fstream> #include <iostream> using namespace std; int main() { int i;//counter s...
[5 replies] Last: This code I found in the net. It is solving of one of handbook task. T... (by send)
[SOLVED]"Segmentation fault" error with "strncpy" function in
 
Hello, guys! I'm trying to get a substring of a string in C and i'm using strncpy function to do this. The compilation doesn't show any error message, but when ...
[4 replies] Last: vlad and smac89. Thanks for your help. Now everything is working fine! (by robgeek)
by lmsmi1
OpenGL Console (Fullscreen)
 
Is there a possible way to emulate a C++ console program in OpenGL or something like OpenGL, fullscreen (with no window or border)? I need something like DOS, w...
[2 replies] Last: So I've stripped the console of all styles and get this: http://www.i... (by lmsmi1)
Tic Tac Toe
 
Hello, I tried the tic-tac-toe exercise and this is what i did, it works the way i wanted it is for 1vs1 and later i will upgrade to be playable with a computer...
[16 replies] Last: #include <iostream> #include <string> #include <cstdlib> //lib for p... (by SkyDriver2500)
by MoLAoS
String Error
 
What does it mean if I am calling a function to read a string and it crashes with the debugger just pointing at the function? It doesn't go any farther. However...
[6 replies] Last: More like I have an undefined level of intelligence. Sometimes I work ... (by MoLAoS)
How to Store the Last Data ?
 
Case An automotive company needs a program that checks gasoline usages. This program can be used to check the gasoline usages based on how fast the car mov...
[2 replies] Last: Oh my god, I LOVE YOU SO MUCH giblit :* Thanks :) (by geezle86)
by klay2
console game
 
it shuts itself down after the first question #include <iostream> #include <string> #include <cstdlib> using namespace std; int main() { begi...
[6 replies] Last: Define please. Also lets look at your code.. 1) you are using goto I... (by giblit)
Returning by reference
 
Hello Like we pass arguments to function by reference, how do we return by reference? Thanks
[9 replies] Last: @JLBorges Though I mentioned that my school teaches me using Turbo ... (by The illusionist mirage)
June 2013 Pages: 1... 2122232425... 49
  Archived months: [may2013] [jul2013]

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