Beginners - July 2011 (Page 49)

Could someone tell me why ceil() isn't working?
 
I've got this function double round (double n) { n = n * 10; ceil(n); n = n / 10; return n; } It's working except for the ceil(n); part. When I...
[2 replies] Last: Seriously webJose, I've been on that page. You think I'd come bother y... (by horseatingweeds)
by codrgi
Something in C++ similar to SQL LIKE?
 
Is there a function in C++ that is similar to the SQL LIKE operator? something in c++ that could do this... char name = var123; if(name like '%123') // wou...
[3 replies] Last: You could use strncmp(), strnicmp(), TR1 regular expressions, or the s... (by webJose)
dereferencing
 
int *p,*v; *p=5; cout<<*p; this program crashes at run time whereas int *p,*t,i=5; p=&i; *t=*p; cout<<*t; runs please tell me why? i am using dev c++ ide
[2 replies] Last: thanks it's really helpfull (by decoderx)
by eidge
Swapping 2 string vars.
 
I'm making a small library for my own use. Although I'm feeling quite stupid as I'm beeing defeated by string pointers. void swap(char *a, char *b) { ...
[3 replies] Last: Pointers are 'regular' variables. In fact, I can't really think of a... (by LB)
by corto
Motivation and goals
 
Hi guys, I've noticed recently that whenever I put some programming idea into a bigger project, my motivation drops. While the project seems to be worth it ...
[8 replies] Last: Awesome replies guys. I can add my own 2c on some of your posts: Alb... (by corto)
Pass by reference to a vector
 
I am not very familiar with vectors and my school book does not help much. I have been researching as much as possible but I am just lost. Here is my function a...
[5 replies] Last: okay, I got it. Thank you. Sorry for my ignorance, I am getting no gui... (by monkeybutt)
How can i convert char to string in here?
 
I tried this method.This is working: #include <iostream> #include <stdlib.h> #include <sstream> using namespace std; int main(){ int a=6789; stringstr...
[2 replies] Last: How can i write? (by Helegurbann)
Understanding strings a bit more
 
Hi, I had this function which caused an error, but I want to know why. It is used to strip strings which may look like this: "text", text, "" or <absolutely...
[4 replies] Last: EditedString is the standard string class with some extra functions. H... (by mr kazoodle)
'do while' loop
 
Hey! i need an advice about this little/stupid problem: #include <iostream> #include <cmath> int main() { using namespace std; char answer; do { co...
[2 replies] Last: oh yess! there are those ANDs :) thanks! i guess this was a bit embar... (by KrixisLV)
C++ Timer
 
Hi guys, I have been searching around the internet and experimenting with timers in C++ but am still having some trouble. I am attempting to make my first...
[1 reply] : Are you using SetTimer and the WM_TIMER message? (by TonyMUK)
by jihad
BAsic,,, need help
 
guys, how i can make a program that gives the even numbers that i inputed... example:i input 10 then it outputs 2,4,6,8 something like that.... im just a be...
[2 replies] Last: You need a loop that starts with 2. Loop as long as the index is less... (by coder777)
Initialization of variables
 
Hello all, First time poster here. Trying to learn a bit more about C++ as it helps me greatly with my UnrealScript programming. Anyway, when looking at t...
[5 replies] Last: That is true. (by Disch)
by fortis
Static Linking
 
I am currently making a 2D opengl engine in C++. Im using wxDevC++ and I have made my project to be a static library. What I want is the user to only need to li...
[2 replies] Last: I just double checked everything and made a simple test. My library on... (by fortis)
by exbow
creating functions problem
 
hi guys. i tried to make the classic hangman game but not entirely builded in int main()! i tried to create 2 functions one for the player's guess and one for ...
[6 replies] Last: Moschops is right, const string The_Word = words ; string soFar(... (by toexii)
by toexii
no appropriate default constructor, func argument
 
So I have a class called Library: class Library{ public: void add_book(Book); void add_patron(Patron); void book_out(Book, Patron); struct Transa...
[4 replies] Last: You're right, when I initialize like MyOtherClass from your example I ... (by toexii)
by cobivw
HELP": Calculator Error??
 
Hi, I am trying to make a calculator with Visual C++ Express. It just doesn't work? Any help?? // calculator 3.cpp : main project file. #include "stdafx...
[6 replies] Last: How do you declare it, and where? (by cobivw)
by Phiru
I am working on File I/O. need help.
 
I write 20(int), 20.5(double), 10.2f(float) as Binary Mode into a file named "abc". (probably it works) And then i got a problem with reading or getting them i...
[1 reply] : p_int is already a pointer, don't take the address again when you writ... (by Zhuge)
Definitions
 
What's the difference between #define x 4 and int x = 4;
[3 replies] Last: +1 Moschops (by Zhuge)
typedef *Food FoodPTR: FoodPtr accepted as type in some places and not others?
 
While using FoodPtr as a return type for member functions in my class, I get an error message that FoodPtr does not name a type. But it is accepted as a type...
[2 replies] Last: Thank you very much. : ) (by WhiteVandal)
Video Game Outcome Question
 
Heya, guys. For those of you who don't know, I am attempting to create a Command-Line Role-Playing Game. I am fairly new to C++, so everything I learn I'll ...
[1 reply] : functions functions functions http://cplusplus.com/doc/tutorial/funct... (by Disch)
July 2011 Pages: 1... 4748495051... 54
  Archived months: [jun2011] [aug2011]

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