49,761 Topics
| |
Hello everyone, I am having a slight problem with my program, and that is that It just doesn't seem to be working! I would like someone to help me fix it, because I can't do It myself. The main problem I am having is adding a string to a string, … | |
Hello all, header files seemed pretty simple when i first learned about them. until i actually tried to use my own. The program that i am attempting to create should simply add 1 to 24, but it is using a function found in a header file as a test. The … | |
Hello guys. I want to create similar web browser in my application like VB6's web browser control (schw**.dll i think not sure). I just want it able to hold JavaScript, edit HTML elements, view page source, submit forms, ... like I already mentioned VB6 web browser component has... Cheers | |
Hello, I am writing a c++ program for windows using the API. My program needs to be able to get some text from the clipboard, import it to the program's scope as a string, and do work on the string. [what I have tried] [code] cout << GetClipboardData(CF_TEXT) << endl; … | |
Hello I have problem with adding two numbers that are less than 10 and their result is more than 10. [CODE]#include <iostream> #include <sstream> #include <string> using namespace std; typedef class node * node_pointer; class node { public: int num; node *nxt; }; string reverse (string str) { int len … | |
Hey, I have a bit of a problem. I have a class that uses C libraries to make a TCP connection, which is accomplished with the connect() function. Now, I'd like to use this class in a Qt program and make it inherit QObject. The problem is, since I need … | |
Hi everybody I wrote this code in my university assignment . But I want to change the global variable (the variables that above the main) to local variable (inside the main) and add the parameters in the functions. [CODE] #include <iostream> #include <string> #include <iomanip> using namespace std; int const … | |
If a user inputs a int number, say 150, how would I be able to read each individual number? i.e., I want to read the 1, do some things with it, then read the 5, and the next number...etc. Thanks | |
If I want to throw an instance of a class, where should I alloc the exception object? Should I use heap: try{ throw new Exception("An error was found"); } catch(Exception* e){ std::cout << e->get_message() << "\n"; delete except; } or should not use heap: try{ throw Exception("An error was found"); … | |
Need to read 4 bytes into a long int format. Both inFileDrs and outFileDrs are in ios::binary form. Is this the correct way to do this? The original piece of code was [CODE]var tableCount = reader.ReadUInt32(); writer.Write(tableCount);[/CODE] [CODE] unsigned long int tableCount, firstFilePos; inFileDrs >> tableCount; outFileDrs << tableCount;[/CODE] | |
The code below is what I'm having problems with... The combobox part is getting me angry and i've searched everywhere, code guru, msdn, stackoverflow, daniweb... And I cant figure it out. Its for a game my friend plays. I play and quit on and off.. I decided to do a … | |
Ok I am working on this program, I input the information it is supposed to pass it to the structures and then display, but its not there to display, and I know the information can't be missing since the math for the total which is done before displaying is done … | |
I am trying to finish up a personal project of mine, but am running into an aesthetic problem. I can't get the window to recognize the hIconSm when I try to set it. [CODE] WNDCLASSEX wnd; ZeroMemory(&wnd,sizeof(wnd)); wnd.cbSize = sizeof(WNDCLASSEX); wnd.hInstance = hInstance; wnd.lpfnWndProc = (WNDPROC) WindowProc; wnd.hCursor = LoadCursor(NULL,IDC_ARROW); … | |
So I have a few pieces of code that I want to implement into C++, and I think I understand what they are, but I want to check. I have been using an array of char[] to mimic the byte[] idea. So keep that in mind when helping with these … | |
Hi! I have a problem with SDL and OpenGL. I wrote a code to convert SDL Surfaces to OpenGL textures. Now I have a function to Draw a rect(with opengl) on a SDL_Surface. That's the code to draw a rect: [CODE] void DrawRect(SDL_Rect *rect, GLuint texture) { float x = … | |
i understand when you use memory on the heap, your program allocates new memory to it to be used...the stack is preallocated memory and when u put a local variable on the stack, and the variables goes out of scope/dies, it technically still stays in memory until you overwrite the … | |
Hi, Does anyone have (or know of) VS c++ which performs capture image using Hidden Markov Model, regards, | |
Well I'm learning the irc protocol by coding a Console client. The client appears to connect to server, set name and nick, But won't join the channel it just says "451 you have not registered". Here's the code Sorry for any lame formatting ect. I'm kinda new to cpp: [CODE] … | |
Hello, im currently making a save function for my Project wich is like this : [CODE] private: System::Void Form1_FormClosing(System::Object^ sender, System::Windows::Forms::FormClosingEventArgs^ e) { String^Sleeptime = textBox4->Text; StreamWriter^ sWriter = gcnew StreamWriter("c:\\DoNotEdit !.txt"); sWriter->WriteLine(Sleeptime); sWriter->Flush(); sWriter->Close(); }[/CODE] And this for the load function: [CODE]private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { if … | |
I'm trying to make a Windows application but I get the error in the title. I am running Windows XP Professional and using VC++ 2008. Here is how I call my code: [code=c++] WNDCLASSEX wcex; wcex.cbSize = sizeof(WNDCLASSEX); wcex.style = 0; wcex.lpfnWndProc = WndProc; wcex.cbClsExtra = 0; wcex.cbWndExtra = 0; … | |
alright, I have most of this hammered out, but still a couple problems I cant figure out. in the player class, the Nextmove function is not working for me. It uses the setvalue function in TicTacToe class(which works fine by itsself) also there are problems assigning player names that I … | |
hi!! i have written this program and it worked, but the problem is ,when it runs it requires username and password. i've no idea about that. plzzz help,i wants to submit immediately.thanks. the code is given below: | |
Hello, This is my first post. I am trying to teach myself C++ and am having a hard time with a function problem. This is not for homework, I simply want to learn something about C++ and I have no one else to ask. The problem I am having is … | |
Hi, I use nested arrays of STL objects to generate a large number of objects (shapes representing projections of anatomical structures). I need to filter these into a tractable number based on certain properties that the objects possess: e.g. their geometric relationship to other objects and their functions (pair(int),order(int),left(bool)) A … | |
Hi all A teacher of mine told me that when an object of a class is created then six things are created.He didn't told me which.I know the obvious 4 things 1)Copy constructor 2)Copy asignment 3)Constructor 4)Deconstructor I don't know anything else?Do you have ab\ny idea?I searched everywhere but i … | |
Just got back into C++ a couple months ago. Mainly, my plan is to get into game development. Hard field to get into, I know, but through school and a hopeful internship this summer, I will be able to fight my way in. I am currently learning SDL and I … | |
So I am converting a bunch of very large #s to what I believe is the ASCII standard? or something similar. And I am getting some negative values which is bad, needless to say. the values are the exact value of the conjugate. Example Should be value 214, instead I … | |
Having trouble running a do while with a if else statement. I'm getting an error saying the "variable 'distanceM' is being used without being initialized." [CODE]int main () { const double PI = 3.141592; double xM, yTheta, distanceM, thetaRad, thetaDeg, xRad, yRad, X, Y; char choice; cout << "This program … | |
[CODE]int main() { static short multiplycounter; static short dividecounter; double decimal; int rdecimal; cin >> decimal; rdecimal = int(decimal); cout << setprecision(10) << decimal << endl << rdecimal << endl; if(rdecimal % 1 != 0) { while(rdecimal % 1 != 0) { if(rdecimal % 1 == 0) { break; } … | |
I found this code, but I wanted to ask a fast question, does this give the maximum possible resolution? Or just the current resolution set? I know there is a System function but I am trying not to use any System functions if at all possible. [CODE]#include "wtypes.h" #include <iostream> … |
The End.