Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
C

CreepingFeature

@CreepingFeature
About
Posts
20
Topics
14
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • XML support in mobile apps
    C CreepingFeature

    This was a dumb qstn!!! :-O The damn reference to system.xml was not set. My aplgz!

    Visual Basic xml question

  • XML support in mobile apps
    C CreepingFeature

    Hi Guys, I'm trying to develop a simple pocket pc app and want to use an xml file to store the data of my custom settings class. I can't find a way to use the built-in xml functionality of vs2005. I can use system.xml etc in a normal (ie desktop) app but mobile is being a pig. Is the xml functionality at all supported in vs2005 mobile sdk? Thanking in advance for your time PS: Aplgz if this is a dumb qstn! :~

    Visual Basic xml question

  • Using VB (VS 7.0) to dev Excel macros etc.
    C CreepingFeature

    Hi Guys, Currently I use Office 2003 VBA to develop macros userforms etc for my Excel sheets. I was wondering if it is possible to use vb.net that comes with VS 7 to develop all of the above. The reason I am asking is that in VBA the controls etc are not as 'nice' as the ones in vb.net and there are more features and so on. Also I realy want to learn VB.net (as I am told the syntax is different and it is more powerful than VBA). Anyway if someone could give me some basic pointers on the whole issue that would be great.

    Visual Basic csharp visual-studio help

  • Initializing an Array inside a Class?
    C CreepingFeature

    Thanks a lot!!! :-D

    C / C++ / MFC question data-structures

  • Initializing an Array inside a Class?
    C CreepingFeature

    Hi everyone! Got a quick, yet stupid question! Why cant you init anything inside a class unless its static const int? Actualy the question is how can you initialize an array inside class private: to be const. I know that it is possible to declare an array and then use a constructor to init it. But how do I make it const if I was to do it thru the constructor. Thanks.

    C / C++ / MFC question data-structures

  • Pointer array access outside a class!
    C CreepingFeature

    Thanks for your time! I know the questions are a bit $#@^ed up, but I'm just a newb! I sorted the whole mess out, I got the class to do what I want and it is now like 20 times smaller :laugh:. Once again thanks for your help! :)

    C / C++ / MFC help data-structures question

  • Pointer array access outside a class!
    C CreepingFeature

    Hi everyone! First, I appologise for my last post :-O! Anyway, got this here code in main(): int number1 = 5; int number2 = 10; int *p_number1 = &number1; int *p_number2 = &number2; int *arrayAddress; int *pointerArray[2]; pointerArray[0] = p_number1; pointerArray[1] = p_number2; cout << " Pointer array at [0]: " << pointerArray[0]; cout << endl; cout << " Pointer array at [1]: " << pointerArray[1]; cout << endl; cout << endl; cout << " Pointer array deref at [0]: " << *pointerArray[0]; cout << endl; cout << " Pointer array deref at [1]: " << *pointerArray[1]; cout << endl; cout << endl; arrayAddress = pointerArray[0]; cout << endl; cout << " Array address: " << arrayAddress; cout << endl; cout << " Array access through address: " << arrayAddress[0]; It compiles and the last statment prints 5 the actual value at the address that is stored in pointerArray[0]. But if I was to put arrayAddress[1] I get garbage. Question: I have a class that contains the above code, or an array that points to a bunch of variables. Is there a way to pass the name of the array outside the class private: to main() and then access it as if i was inside the class. I am asking because I have a class private: filled with 24 variables, and got 24 members in public: that can return the current value of those variables. To shrink the class I decided to make an array of pointers to those variables and pass it outside the class so that instead of using the member functions I would lookup/change values directly thru the array of pointers. If you have another solution to this problem PLEASE HELP! Thanks for your time! :)

    C / C++ / MFC help data-structures question

  • Class of Classes! or #$@%#^#$@$@!!!
    C CreepingFeature

    Forget it! I think I was sleepwalking ystrday or somthn. Figured the whole thing out. By the way classes are so big due to enums, got lots of them!!!

    C / C++ / MFC question c++ debugging help

  • Class of Classes! or #$@%#^#$@$@!!!
    C CreepingFeature

    Hi! I'm going nuts here! Spent a whole week building three huge classes and now got a bright idea...What if I was to organise my classes, def in headers, say cls1.h cls2.h cls3.h (by the by got implementation files .cpp's :doh:), into a neat monster class clsMonster.h! If you didn't understand what happened just now dont worry I still cant figure out why I even had the thought in the first place! The thing is I got these 3 classes that logicaly are a part of a thing that can be a big class on its own. I started developing them separately since they are big but now feel that they would be neater if there was one class containing them sub classes (just jaming every member in clsMonster would be overkill and give me 2000+ lines to debug in one pile! :omg:). I made a new header, defined the big class but now need to access the members of sub classes from main() thru the big class. Problem: Cant figure out the damn syntax of accessing the members of sub classes. eg. .... #include "cls1_H.h" #include "cls2_H.h" #include "cls3_H.h" class Player { blah blah }; ..... #include "Player_H.h" main() { Player myChar; myChar.blah blah(); // this would access members of Player } BUT HOW DO I ACCESS THE HEADERS INCLUDED IN Player.h??? Is there an other way to do this! (main concern - neat groups!!!) If anyone is on this particular line right now, THANKS FOR YOUR TIME! -------------------------------------------------------- DEBUGING IS A BITCH :smiley whith brains blown out: --------------------------------------------------------

    C / C++ / MFC question c++ debugging help

  • Class View in VS 7
    C CreepingFeature

    In VS, there is a window that shows solutions, classes etc. :doh: If in class view you can see all components of that class. If the class contains enums etc. you can see all of the components by name in their respective groups. Say: Enums ----balahBlah ------bl ------bla ------blah (Dont mind the ----) The elements of enums etc. are listed by name but in case of enums the named values are actualy type int. Q: Is there a way to force VS to organize the elements by value? (VS only organizes by name, access, and group!) Eg. If say blah = 0; it should be first in the list and if bla = 2; it should be last. Thanks in advance!

    C / C++ / MFC visual-studio question

  • exit( ); Error descriptions in VC++ 7!
    C CreepingFeature

    Hi! Don't even know how to put this! So just try to guess what I mean! :laugh: In VC++ you can include this line exit(100); etc. And force the program to exit to OS with VC++ reporting, in the EXIT window: programm....exited with code (100) or something like that. My question is this: Is there a way to tell VC++ to report 100 as say wrong argument for myFuntion(int); instead of just reporting error number? I only want to know how to make VC report the error with description not the program itself (ie. via a dialog window). -------------------------------------------------------- DEBUGING IS A BITCH :smiley whith brains blown out: --------------------------------------------------------

    C / C++ / MFC question c++ help tutorial

  • It seems nobody here knows how to do this!!!
    C CreepingFeature

    Sorry for the post name :-O! A week ago I posted a topic on clearing the screen in dos! Got four replies, none of which worked! Here is the problem. I have the folowing code inside main(). cout << " Hi! I am dumb."; cout << endl; // Here I need the screen to clear the way BASIC used to clear it when you put cls() or something like that, cant remember now. // So that this next statment is printed on a clean dos screen! cout << " Hi! I am dumb."; cout << endl; Some one suggested to cls() but didn't mention the header, then someone else said to use clrscr() and #include conio but conio does not have any members with such name. Even the docs supplied with VS 7 Ent. do not have any refference to cls() or anything even closely resembling it! If some one actualy does know how to do this PLEASE HELP! If somebody was offended by this post I aplgs! But some times you should take the time to read your own posts to see if they make sence or compile proper! Thanks in advance.

    C / C++ / MFC help visual-studio tutorial

  • #define and Streams
    C CreepingFeature

    Hi everyone, especialy those nice gents who actualy answer the questions! ( Ladies? :laugh: ) I know that you can #define fileName "myFile.txt" a string in the globals area, and when you need to you can stream.open(fileName) so you wont have to write the file name every time you open a stream. My question is this can the same logic be used to define the actual stream for example #define ifstream inFileStream so that I wont have to declare the streams inside functions that need to use them. So that the only line relating to a stream in the function would be inFileStream.open(fileName). This should also remove the need to pass the streams to functions since I will be able to open and close them any where any time. Thanks in advance!

    C / C++ / MFC question tutorial

  • Updating file attached to ofstream.
    C CreepingFeature

    I got a simple DOS app. primary school slash hello world slash newb kind of app. So the thing is, an ofstream opens a file then writes a string, just a word derived from user thru cin >> word; then closes it. Now I need this file to be reopened later in the loop and writen to again while preserving the old data. Tried outFile.open("filename", ios::ate) to force the file pointer to the eof, but can't make work. I am prety sure that is wrong anyhow. What is the right way to do it? Oh, by the way, there must be a way to keep user inputs in some sort of list inside the program code without rellying on ofstreams. Can someone tell me what parts of C++ handles that sort of stuff, just a name would be OK. Thanks for reading this long ass post!

    C / C++ / MFC question c++ ios

  • How to NULL arrays?
    C CreepingFeature

    That was my thread!:omg:

    C / C++ / MFC question help tutorial

  • How to NULL arrays?
    C CreepingFeature

    Following my first dumb question, I #include number[2]. Sorry about that! Being a newb is a bitch!!! :laugh: How do you NULL arrays? Is it ok to: int numbers[10] = { 1, 23, 50, 2, NULL}; Or do I have to: int numbers[10] = {NULL}; and then assign values using a second statment! Apriciate the help!

    C / C++ / MFC question help tutorial

  • Arrays!
    C CreepingFeature

    Quick DUMB :omg: question. I know that an (int array[]) which was not given values for all elements fills them with zeroes. Say an int array[3] = {1, 4} would have array[0] = 1, array[1] = 4; and array[2] = 0 (that is assigned by compiler). A think thats how it is :confused:! Now if I got a (char array[]) is the empty element given a integer 0 or some char. And if I was to check for it would I use simple if (... == 0) or if (... == '0'). Thanks in advance.

    C / C++ / MFC data-structures question

  • Locating chars in strings etc.
    C CreepingFeature

    Thanks!!! ;)

    C / C++ / MFC help question

  • Locating chars in strings etc.
    C CreepingFeature

    It's a bitch! :mad: Anyhow here is the thing I got myself a string, just a word. I need to locate a char in it and then erase it, also it must be done in a loop so that if char is in there twice etc. it would be deleted. Problem: What if char doesn't exist in the string. I tried to use if( !(blahblah.find(char)) ) doesn't work because if .find doesn't see the char it throws the value of char position out of range of length of string or drops it bellow zero, causes an out of range error. (This took me half a day to figure out) :mad: So I used: if( (blahblah.find(char) < 0) || (blahblah.find(char) => Length) ) same crap! Two hours later found strpbrk()! How can I use it together with strlen to simplify the condition and avoid out of range error during run-time. Basicaly what I need is to look at a string, single word. Check if it has a char I provide. If it doesn't I need the if-statment to fall thru. But if it does have it I need to erase it, this I can do :laugh:.

    C / C++ / MFC help question

  • How to clear the screen in DOS
    C CreepingFeature

    :sigh: I am just starting with C++, and have a problem. I wrote a text game but the thing is some times I want the new question etc to start at the top of a clean black screen (that is erase all previous lines). I could just put a pile of endl; but a couple of days ago somewhere on the site I saw a clrScrn; statment or something like that and remembered BASIC. Could someone tell me the the #include and the correct way to use it. Thanks in advance!

    C / C++ / MFC c++ game-dev help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups