Beginners - September 2009 (Page 13)

Wrong variable is changed
 
I'm posting this problem in the Beginners section in case this is stupidly easy to answer. My problem is with the following code snippet: Collision XY, TXY; ...
[2 replies] Last: Knew I was forgetting something basic, been awhile since I read my c++... (by bmargoat)
Dev-C++ Portable doesn't compile anymore
 
Hi all, yes, that's the problem happening with me. My Dev-C++ simply doesn't compile anymore. I forced a syntax error and it didn't find the problem. Some...
[no replies]
string to decimal
 
hi how do i convert a string to decimal value? i read in a string "20" , how do i convert it from string to decimal.. does reading it as a string assume its h...
[2 replies] Last: #include <cstdlib> int strtol( const char* nptr, char **endptr, ... (by jsmith)
String to different types
 
Hi i have a string, eg. 000050000081E1500F01EE100AF8EE34101FE59A i want to read it as different types., how do i read it as hex? decimal etc? could someo...
[6 replies] Last: Please read this. If you are already using std::string why not use st... (by kempofighter)
use of atoi
 
hi i have a string xxxxxxxxxxxxxxxxxxx i am reading the string into a structure of smaller strings, and using substr to parse it. i need to convert one of ...
[5 replies] Last: Please read this. Consider some of the other alternatives before usin... (by kempofighter)
Beeping in the background
 
Hey all! I wanted to ask a weird question, i dont even know if its possible, sorry for my noobisheness I wanted to ask is there a way to do a continuous b...
[6 replies] Last: I really need to learn how to do this (by award982)
using namespace std
 
hi guys while I was reading codes I see some guys using std::cin in their code and so on. Why? Why not just use a global using namespace std; ? is there a ...
[10 replies] Last: I personally never use using namespace xxx; in the global scope, I e... (by R0mai)
how to display odd number?
 
please help my lab practical... enter 10 integers and display only odd number in a row. use for loop.
[15 replies] Last: bah.. too early in the morning.. I'm not thinking. a is correct. sor... (by Aakanaar)
for loop
 
ok so my code is something like this #include<stdio.h> int main() { int factorial =1, num; printf ("Enter a value"); scanf ("%d", &num); i...
[5 replies] Last: You can debug your own program by placing printf statements (or std::c... (by kbw)
Strings Confusion
 
I just get lost with strings, I'm not even coding with it right now, I need some people to just explain it to me. Whenever I do try coding with it, only the f...
[4 replies] Last: Post the code you wrote which created that error above, if you still h... (by mcleano)
cin>>problem again :)
 
Well in my last massage I asked for help and Duoas really kindly helped me :) and I know that for strings i should use getline(cin,stringname) Now I have an...
[8 replies] Last: 'Why fflush(stdin) does not work' :P... http://faq.cprogramming.com... (by Incubbus)
by joshky
first real program
 
OK, I have a game where I want to remap the '=' key to the '`' key. It seems pretty straightforward, but if I make a console program it will be in the backgroun...
[2 replies] Last: Google around SetWindowsHookEx (). (by Duthomhas)
by trac15
convert a static array into a dynamic one?<using pointers> how do i modify?
 
#include <iostream> using namespace std; const int MAXDBSIZE = 100; /*Type delcarations - NO MEMORY ALLOCATED (EVEN STATICALLY)*/ struct InvRec /*Inve...
[1 reply] : You're expecting us to decipher this to find out what you're asking? (by helios)
by turdie
Replacing part of String
 
I want to replace part of string ex. I have this string turd!turd.turd.456.tird I want to remove anything past the ! (and the exclamation point itsel...
[6 replies] Last: <-- title The title gives no indication as to whether you're talkin... (by mcleano)
by ztein
How to approach this program?
 
Hi, I'm reading C++ Primer Plus 5th Ed., and I got stuck on one of its excercises: Write a program that asks the user to enter a latitude in degrees, minu...
[2 replies] Last: The formula to find the resulting degrees from user's input, and how t... (by ztein)
Overwhelmed & Confused with homework...
 
This is my homework assignment 3.17 (Digit Extraction) Complete an application that allows the user to input a five-digit number. Your application should then ...
[6 replies] Last: Also, endl is approximately equal to this: std::cout << "\n" << std::... (by chrisname)
errors with logical operators
 
i am getting error in line where i declare enum Logical(..) and i don't know what is wrong so check it out: #include <iostream> using namespace std; ...
[2 replies] Last: oh thank you very much, hehe this is an example how some stupid error ... (by mr zdeis)
Please show me how to make a global const object construct only once.
 
Hi my problem is one of my global const objects is getting constructed more than once. #ifndef _UTILS_HPP_ #define _UTILS_HPP_ class TestClass{ pu...
[4 replies] Last: a.cpp includes Utils.hpp and b.cpp includes Utils.hpp. include guar... (by jsmith)
Typecasting to a SubClass
 
I have a parent class and subclass partially declared here: class Object { public: Object(); virtual Object clone() const; }; class Card : public...
[5 replies] Last: @SMuzzlim4: You have to be careful about object slicing . Card:... (by jsmith)
Varible looses it's content
 
I'm using the program Dev-C++ to code my program. I've just touched up on loops so I've been testing out every single loop there is in this example program I co...
[5 replies] Last: That is the best fugging answer I have ever seen and I thank you grea... (by chrisname)
September 2009 Pages: 1... 1112131415... 23
  Archived months: [aug2009] [oct2009]

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