Beginners - January 2010 (Page 21)

for loop iterator
 
consider this code I made. char input ; char allCloseBrace = {']','}','>',')'}; char allOpenBrace = {'[','{','<','('}; int i=0,j,locClose = -...
[2 replies] Last: Thanks jsmith. I already programmed a working algorithm for this one. ... (by olredixsis)
Visual studio substrings std::string().substr()
 
Hello All, I'm trying to figure out how to get a substring to work with visual studio. Is there a way to do it without having to create a template argume...
[2 replies] Last: Thanks blackcoder41, I did see that. I will have to do some test t... (by valefar)
age calc and with loops
 
i am making a age calculator that you type in a date like 09/10/89 and it puts out how old you are in years days hrs and minutes... i have the formula all rea...
[4 replies] Last: the ctime header has functions that you can utilize. http://www.cpl... (by BettyBoopTS)
Passing addresses into functions
 
I'm writing in c btw. I have the address of a memory block, float ptr , containing N floating point numbers. I would like to pass this address into a ...
[5 replies] Last: @ john: nah.. the function prototype expects to be handed over a point... (by Incubbus)
Trouble using the stringstream conversion for numbers/strings
 
Hey, i am using the string-to-number conversion due stringstreams in a loop. i was wondering since it did only work the first time the loop runs. after a...
[2 replies] Last: do { pos = strstr(fpos, ";x;"); memcpy(secondary,fpos,(pos-fp... (by Incubbus)
Magic 8 balls.
 
My C++ class is now learning about Random Numbers . My teacher asks the class to write a program for Magic 8 ball. Me and my partner don't get what we should...
[3 replies] Last: OK, I'll tell you the basics on randomizing numbers although I will no... (by tummychow)
(Multidimensional array of structs Dinamically allocated)
 
I was given this piece of code for study. I understand much of it, namely the typedef's and such, but I'm really having awefull time trying to understad the pl...
[5 replies] Last: I have to say really thank you very much! Before no one could tell... (by DemienBjarne)
Global Variable Memory Handling
 
Hi , I have one doubt in global variable memory handling. In the following code. #include <iostream> using namespace std; int dog, cat, bird, fish; voi...
[1 reply] : I think that is just a coincidence. Well, I suppose it's probably not... (by moorecm)
by btripp
Heres a fun challenge for you guys (1,2)
 
On my first csci test dealing with recursion and some other stuff I got a recursive problem that was the following. Write a recursive function that takes in ...
[25 replies] Last: echo "int main() { main(); }" > foo.cpp g++ -pedantic foo.cpp foo.... (by jsmith)
Error output
 
I would like to ask how I could make this condition int input; cin >> input; If (input is not an int type ) {cout << "error" << } else { cout << "y...
[2 replies] Last: you can also see my topic if you want. http://www.cplusplus.com/forum... (by olredixsis)
Source code problem.....
 
i am a new learner of C++ n just study it based on book n practising..... I try to do something but it didn't do what I want.... What is the problem in my s...
[3 replies] Last: One of the things I noticed at first glace is in the next section of c... (by DemienBjarne)
Starting over, need any advice
 
So I've recently upgraded to Windows 7, and with that, I would like to start fresh. What I mostly would like help with is, setting up my libraries. Either Direc...
[4 replies] Last: goto youtube, there is a name helpfulprogrammer who teaches DarkGDK an... (by blackcoder41)
saving a value to a nother folder to be retreived
 
If i were making a game that is entirely text based. When the player gets an item, it is stored like: int gun = 1 everytime he needs to use the gun, he needs ...
[2 replies] Last: your assumption is correct. however, i could not see where it said "t... (by n006ruler)
by abie30
can somebody check the code that i post,for me
 
abie30 wrote: >i have bold something on this code >can u check for me,whether correct or not the code that i write for the dispalay result.. > >#include "in...
[2 replies] Last: Oh I agree, this unfortunately doesn't help anyone help you. If u n... (by StickyTape)
check if input is integer
 
while((cout<<"Enter Year: ")&&(!(cin>>getYear)||getYear<0)){ cout<<"Invalid Input!"<<endl; cin.clear(); cin.ignore(numeric_limits<streamsize>::...
[7 replies] Last: Use this reference to determine the C++ header names instead of the de... (by kempofighter)
by Mazd
Inline function
 
Hey.Guyz.Can anyone explain to me,in brief about 'inline function',it seem to be important in class,but am figure out nothing from it.
[10 replies] Last: There comes a point where larger code becomes slower code. This is pa... (by helios)
public member function of string
 
Is there an easier way of determining what kind of close brace comes first in an input string without converting the string into array? My code goes like this....
[3 replies] Last: Even better! Nice find. Here's the link: http://www.cplusplus.com/r... (by moorecm)
by winten
std::wstring to System::String ^
 
After some tutorials I managed to get information from .xml, but where is another problem for me. How can i convert wstring to System::String^ ? I obtained i...
[2 replies] Last: does xml.GetData() returns any value? btw, this is C++/CLI right?... (by blackcoder41)
by Tigjaw
Printing String to textfile produces (null)
 
Hi all, I'm new here and quite new to C++ so be gentle! I have a struct which contains several variables including string, float and int. I create an array of...
[10 replies] Last: Thanks again moorecm. When we've been taught java, OOP was thrown at u... (by Tigjaw)
by winten
same object in different panels?
 
I do not understand why same object do not show in all panels I add it, only in first.I have to create a new label with same text and then use it. For exampl...
[2 replies] Last: I am sorry for stupid and innacurate questions, I'm new to c++, found ... (by winten)
January 2010 Pages: 1... 192021222324
  Archived months: [dec2009] [feb2010]

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