Beginners - July 2010 (Page 19)

by Erain
Connecting Source Files
 
Hi all, I've worked through the beginner tutorial of this site, and have a good grasp of all the concepts contained there. Now I'm learning to use SDL. A...
[17 replies] Last: If you need constants to be shared by more than one .cpp file, put the... (by filipe)
by Goofy
The output includes some numbers which shouldn't appear
 
#include<iostream> using namespace std; class alpha {int data; public: alpha():data(3){} friend int frifunction(alpha);}; ...
[2 replies] Last: ah lol yeah , int ty mate , I expected 'This function has access to th... (by Goofy)
Input/Output to File Question
 
I am trying to make a playlist organizer as an exercise to learn more about i/o to files. I'm having lots of problems but the two I need help with is positionin...
[6 replies] Last: I already got it to work but thanks for the replies. (by MottMan)
Understanding 'this'.
 
I'm working through the tutorial on this site and I'm a little unsure about this . // this #include <iostream> using namespace std; class CDummy { ...
[6 replies] Last: Exactly (by binarybob350)
Question on enumeration range
 
I'm using a book to learn C++ and I don't understand its explanation on how to find the enumerator's range. The explanation is as follows: The range is def...
[7 replies] Last: can you mark as solved? (by stavros)
functions
 
Hi, So I have an assignment to do and it goes as follows. Write a simple program which reads in 2 integers, a & b, from cin. print out the values they ente...
[7 replies] Last: Need to call the swap_values function and print out x and y again. ... (by binarybob350)
by human
Remove integer from array
 
Ugghh C++! Im trying to search within an array for a number. If the number is in the array, I want to remove it. I get an error after I input the "checker". The...
[9 replies] Last: Here is one with some error checking added in and the original input o... (by kempofighter)
A strange string problem
 
#include <iostream> #include <cstring> using namespace std; string convert(char kter ,int len) { char *kar = new char ; for(int i=0;i<len;i++) kar = k...
[5 replies] Last: Thank you for all... (by systempause)
no match for 'operator==' even though the operator is defined.
 
Hi guys. I'm having an annoying issue with my code. I created class named box. In that class there is a vector of another class, lipids. For that class, I o...
[6 replies] Last: OK. Thanks (by yotama9)
by koopa
easy question??
 
Hi all, looking for some beginner tips, Im setting up a simple menu program using the switch/case statements, the menu choice will be an integer say 1, 2 or ...
[2 replies] Last: used char and it works fine, now embarassed at how simple the solution... (by koopa)
characters & strings
 
I'm supposed to create a program that displays a check. We're working with Characters and Strings. My question is, How can I take a number someone has inputted ...
[3 replies] Last: You might want to use std::getline() to read the date and the name, be... (by Galik)
Runtime error with decompress program.
 
Hey guys. Here's my problem: When I try to run my program I get this error: terminate called after throwing an instance of 'std::ios_base::failure' what...
[no replies]
by kaduuk
Problem with pow function
 
Hey guys, I've created my own version to use setprecision. However, when I try to compile my code, it gives me this error message: In function `float se...
[3 replies] Last: It is because the pow function used here has no matching definition in... (by mgupta)
complexity of code
 
what's the time complexity of following code and why? for (i = 2; i*i <= n; i++) { if (a ) { for (j = i*i; j <= n; j+=i) { a = 0; } ...
[2 replies] Last: is structure a primitive data type, if so, why? Not in my opinion. ... (by binarybob350)
Passing many objects by reference into functions
 
I am creating a small game to teach myself C++. This particular project game is only trivial but its implications are vital for other intended projects in the ...
[7 replies] Last: Brilliant. Thanks very much for that. Its cleared the way and gave me... (by AlphaBravo)
I am 21 years old and i am new in c++
 
I'm new in c++ I only start learning this month, july.. and this is my first work.. I just want to post my 1st work.. I want to be good in c++, unfortunately...
[4 replies] Last: Sure, just about anything is possible in C++! You could do something l... (by RyanCaywood)
why the exe no show in screen?
 
#include <iostream> #include <string> #include <fstream> #include <conio.h> using namespace std; std::string& purehex() { ifstream ifs("sft.txt...
[1 reply] : purehex() doesn't return a value so I think it would be a void .... (by bluezor)
Keep asking for user input - part two.
 
Original Problem: Write a program that asks the user to order an ice cream treat. The user selects the type of ice cream, the sauce, and whether or not to ad...
[2 replies] Last: I think the problem is looking for something like this (psuedocode): ... (by firedraco)
error checking fread wrapper
 
I'm working on a large project, trying to eliminate warnings. One of the most common warnings that crops up is that the return value from fread isn't checked. f...
[3 replies] Last: Thanks, the problem was a completely unrelated issue. I hadn't told cm... (by Craig Pemberton)
Complete noob to C++, got a few simple questions
 
So I started a college class completely focused on C++, it's only a month and I have like 10 homeworks, they get more and more hard. I have Visual Studio 200...
[6 replies] Last: There is a build menu in VC++ 08 >_> Fifth from the left. (by firedraco)
July 2010 Pages: 1... 1718192021... 31
  Archived months: [jun2010] [aug2010]

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