- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 10
- Posts with Upvotes
- 10
- Upvoting Members
- 9
- Downvotes Received
- 11
- Posts with Downvotes
- 7
- Downvoting Members
- 8
School
- Interests
- Playing music, Vidya gayms, and programming =D
- PC Specs
- Enthusiasts gaming comp I built. To long to list
88 Posted Topics
Re: ^ Ill never give away my secrets! <I like velveeta cheese on my pizza Is super awsome V | |
The question is in the title. Rather then making a call to the OS, is there a more efficient way to do this? Thanks Edit: Just though of something else to. Does Sleep(2000); make a call to the OS as well? If so is there another way to do this … | |
Re: When I was a child(To old and would regret it if I currently did...=( dug a hole in the ground with a spoon? | |
Re: User: ? User: Hello. Cleverbot: Why? User: Why did you ask me why? Cleverbot: I did not. User: Yes you did. Cleverbot: No I didn't. User: So what kind of music do you like? Cleverbot: That's classified. User: But music is a beutiful thing! Cleverbot: If Music is not a … | |
Do people who use these API's even know how to program? Ive never used XNA before, but it seems like the average Joe can download it, copy past from some tutorials and make some triple A game title. It kinda pisses me off. If anyone here begs to differ, let … | |
super annoyed by that friggen HostWay add up top? Whenever you move your mouse over it, it drops down and fills your entire screen. Hard to avoid not hitting it with the mouse =(. NEW AD PLEASE! | |
[code] #include <iostream> using namespace std; template <typename T> T total(T numValues) { } int main() { cin.ignore(); cin.get(); return 0; } [/code] Write a template for a function called total. The function should keep a running total of values entered by the user, then return the total. The argument … | |
[code] void NewCustInfo(CustData &cust) { cout << "Customer Name: "; getline(cin, cust.name); } [/code] CustData is a structure that is declared, and the name data member of that struct is of type string. For some reason when I call this function(there are no compile errors), it displays the cout statement, … | |
Why are you able to declare them using the class keyword or typename keyword? Is there absolutley no difference? Thanks | |
Re: Heres a link that gives you the formula you need [url]http://www.straightdope.com/columns/read/2213/whats-the-story-on-perfect-numbers[/url] Oh ya, if you want to print out to the console, you need to use either printf, or include iostream and use cout << | |
Re: Im surprised no one has reamed you for this yet, but don't use goto. Throw it in a nested loop, or restructure it. | |
Re: Guys, im pretty sure you lost him with all the chatter lol. Just download either Dev-c++ or 2008 VC++ express. They will do anything you need for now, especially if you are just learning. | |
[url]http://en.wikipedia.org/wiki/Brainfuck[/url] Interesting. One day once I figure out c++, I might give this a whirl! | |
[code] void encrypt::transform() { int length = 0; char *buffer; char ch = ' '; int i = 0; fileEncrypt.open("filter.txt", ios::in | ios::beg); fileEncrypt.seekg(0, ios::end); length = fileEncrypt.tellg(); fileEncrypt.seekg(0, ios::beg); buffer = new char [length]; fileEncrypt >> ch; while(!fileEncrypt.eof()) { buffer[i] = ch; i++; fileEncrypt >> ch; } for(int j … | |
I was just in class, learning about STL and class templates. My teacher said you cannot split the class declaration and the function definitions into the normal header/cpp file like you can with non template classes. Is this true, and if so why? I assume it would have somthing to … | |
Re: [url]http://lmgtfy.com/?q=c%2B%2B+prime+factorization[/url] | |
[code] #ifndef BASE_H #define BASE_H class base { public: base(); struct baseInfo { int SlotCount[4]; }; private: protected: }; base::base() { } #endif [/code] This is my header file, but how do I access the struct and its members through an object of the base class(through main)? I cant find … | |
Is there a way to use toUpper with a string, or do you have to loop it through an array of chars? Ive been googling everywhere, but havent really found any examples on how to properly use it. Thanks | |
Re: You would just use the modulus operator(%). Is this for homework? I got a number factoring program I wrote a while back for fun that will do what you want plus more. I can post it, but the rules say you gotta try first before you are helped. | |
Re: VB is not a compiler, it is a language. Your using vc++ i assume. Even then, vc++ is not a compiler, its an IDE. Your compiler is most likely MingW. | |
Is there another reason besides having a clean, easy to read source file then to use overloaded functions? Thanks | |
[code] #include <iostream> using namespace std; int main() { double var1 = 0; var1 = 2/10; cin.ignore(); cin.get(); return 0; } [/code] Its not setting var1 to .2 it is keeping it at 0. wth? it does 10/2 = 5, but then it does 2/10 = 0. | |
MessageBox(NULL, (LPCTSTR)"Test1", (LPCTSTR)"Test1", MB_OK); This code is popping up the window correctly, but it displays all squares. Whats wrong =( | |
Do any of you guys know if Winsock is a popular API that is used for companies hiring programmers? Thanks | |
[code] #include <iostream> using namespace std; class A { private: int a; }; A::A() { a = 10; } int main() { A obj1; cin.ignore(); cin.get(); } [/code] It is giving me the error Error 1 error C2600: 'A::A' : cannot define a compiler-generated special member function (must be declared … | |
This is an assignment for my c++ class im taking. [code] #include <iostream> #include <fstream> using namespace std; const int NAMESIZE = 50, DATE = 25; struct inven { char name[NAMESIZE]; int qnty; double wholeCost; double retailCost; char date[DATE]; }; void displayMenu(); void addRecord(fstream &); void displayRecord(fstream &); void modifyRecord(fstream … | |
Re: I drippled a little bit in my underwear becuase i didnt shake enough =( FUUUUUUUUUUUUUUuuuuuuuuuuuuuuu | |
Is this API striclty for 3d applications including sound and modeling etc.... or can you program windows forms as well? Just wondering | |
| |
Assuming that a year has 365 days, write a class named DayOfYear that takes an integer representing a day of the year and translates it to a string consisting of the month followed by day of the month. For example, Day 2 would be January 2 Day 32 would be … | |
Hi, so ive been teaching my self pointers, and I just wanted to clarify what I assume so far. You cant declare: int var1 = &var2; You MUST use a pointer to store an address: int *var1 = &var2; When assigning a pointer variable, it must always point to an … | |
Just wanting to see how you guys view this, but as far as I understand, a constructor for a class is only used to initialize variables. Is this true? THanks | |
Re: Ive never used them before because I have not learned yet, but you Colon is an inheritance operator. Not much help, sorry =( | |
Hi, is there a quick way to format a float variable that is 0.775 to display it as 77.5? Thanks To better clarify, im doing a simple little tasks of variable = variable / variable to find the percentage of something. | |
Re: CahihiKiller(KAH . HEE . HEE . KILL . ER | |
From people who know what wxWidgets is, I always here a lot of grief about how it is to simplistic, but compated to VB what do you guys think? Ive only ever worked with wxWidgets for a short period of timebut thougt it was very good. What do you guys … | |
So say I want to open a text document for reading using an instance of ifstream.open, etc.. etc... So once i open the txt file to read from it, what functions do i use to scan each character and put each character into an an array slot? Ive seen loops … | |
Is it possible to open a file in binary mode and make an array out of it then to encrypt that information. I guess I should ask how you would start something like that? Thanks | |
Re: [url]www.cprogramming.com[/url] go there and theres a tutorial section on c++ that will get you started. | |
I am writing an app right now that needs winmm.lib. I tried typing winmm.lib in the project properties under the correct section, but kept saying that does not exist. So i did a little research and found that if i type -lwinmm it works. I am using dev-c++. Can anyone … | |
I hope all of you Obama fanboys are proud that you finally elected your closet terrorist into office so that he could shut down Gauntanamo Bay and release all his muslim friends, and while he was at it he shut down all over seas prisons linked through the CIA so … | |
When I declare an event table in a class a.k.a DECLARE_EVENT_TABLE(); then try to compile, i always get this error: [Linker Error] undefined reference to `vtable for Utility' (utility being my class) What does this mean and how do I fix it? All research on this has turned up dead … | |
If I were to work on say an Instant Messenger project, and wrote the gui and event handling using wxWdigets, could I then use the windows API and use winsock to connect the two computers? Basically are API's interchangble in source code? | |
[code=c++] #include <wx/wx.h> class Hello : public wxApp { public: virtual bool OnInit(); }; IMPLEMENT_APP(Hello) bool Hello::OnInit() { wxFrame *frame = new wxFrame(NULL, -1, _T("Hello"), wxPoint(60, 70), wxSize(500, 600)); frame -> show(true); SetTopWindow(frame); return true; } [/code] C:\Documents and Settings\Levi\Desktop\C+++\Makefile.win [Build Error] exe: *** [Output/MingW/Project1.exe] Error 1 Why do i … | |
I want my program to run on start up through editing the registry, how would i do that? Certain API's? or a specific way through c++ to do it? Or is that even the right method? Basically i would prefer to not use the startup folder in XP. | |
Im not sure if this is how the process would work, but if i am to say create a header file named myheader and in that header wrote [code=c++] #define functionName { code... } [/code] and then wrote a .cpp file and in the source code I would #include <myheader> … |
The End.