ok thanks....let me put an end to this as of now...i think i need some more reading about STL...will do that first and if i still have got the same question left unanswered then i will post here...
Type: Posts; User: roalme00
ok thanks....let me put an end to this as of now...i think i need some more reading about STL...will do that first and if i still have got the same question left unanswered then i will post here...
ohh lord...so true...your post laserlight dawns on me like an epiphany..the list will be destroyed as soon as control hops out of the function...
well i am not trying to solve any particular...
grrrrrrrr....my bad...ok heres an example code ..i am not attempting to call main() as brewbuck guessed..my bad if the post is confusing..infact I am in elementary school as brewbuck guessed right...
i know but then i was planning onto writting special functions for each tasks that i would be performing on the sorted list.Hence......thanks though for ruining my dream of wanting to return an...
LOL...i think its safe to assume that the answer is blowing in the wind and the answer is NO
....and if so what is the function defination then to be ?
I just want my self written function (sort) which sorts lists to return me a pointer after its execution so that i can perform tasks on...
Man...persistence pays in coding...and thats why i love coding.We c++ aspirants are taught..never to give up...never to surrender..for the death in a compiler is the greatest glory...err sorry wrong...
Ok i will try and read some more about FindFirstFile(); FindNextFile(); and FindClose();
I think the problem here is that i expected it to be easy...like for example i thought i would give a...
thanks....i went through the FAQ (level3) Accessing a directory and all files within it...saw the linux and win32 examples....tried to study the win32 example in it for more than an hour...it all...
hey hey,
so i sat down today in my quest to increase c++ knowledge..
say i got some folders on my C drive ( C:/ ).
OS is XP
Is there a way to read the names of the folders through c++?...
Sorry didnt see that Tonto had already answered it and given the link
Thanks again all
lol i got this 6.0 compiler so i could learn MFC since all the online tutorials for MFC are based on VS...
Exactly...thats why the title "Am I on Drugs"
I never had the problem using Visual Studio 2005 or.NET
However when using Visual Studio 6.0 the problem is rampant....
I did some more googling...
Lol...o mighty lords of c++ then pls do enlighten me in my quest to be the master of c++
Seriously...any help...i could just live with hitting ENTER twice after the input but i wanna know why it...
as simple as this
#include<iostream>
#include<string>
using namespace std ;
Indeed...it works now...many thanks to all...( and dont rejoice...it wont be long before i come up with more annoying questions)
thanks :D
damn my noobish negligence....i had forgotten to include string header
now it compiles fine ...it even links fine...but when i enter a movie name (which is read by cin>>name;
the program...
error C2679: binary '<<' : no operator defined which takes a right-hand operand of type 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
my newbie brain cant...
Got this small code which results in "windows has encountered a problem with this and has to close it down etc etc " error
It happens at user input
#include<iostream>
#include<list>...
/* I got considerable c++ coding knowledge now (hope its not arrogant to say this)
Been coding console applications since 3 years at college and i usually go about lending everyone a hand when they...
using .c_str() member of the string class got rid of the compiler error and i could run the code successfully
Also putting an '\0' at the end of char array path solved it.( i now so remember my...
True...I dont myself like the ugly C style strings.But passing a std::string as a 3rd Parameter to the ShellExecuteA function results in a compiler error which says
"'ShellExecuteA' : cannot...
right..."path" is a tring and i want variable...actually in the code i dont have " ".That was a mistake while pasting it here on the board.However i think i know why this is happening now
During...
I am now using ShellExecuteA.
HINSTANCE hRet = ShellExecuteA(
HWND_DESKTOP, //Parent window
"open", //Operation to perform
"path", //Path to program
NULL, ...
OK i hope this wont be considered as bumping an old topic.Since it was just made yesterday i thought it more appropriate to post my question in this rather than making a new thread.
So the problem...
OMG It worked....what a sense of achievement lol..well thanks guys..i need to make this forum my home page :P