49,761 Topics

Member Avatar for
Member Avatar for TailsTheFox

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, …

Member Avatar for arkoenig
0
111
Member Avatar for Vv IVIatthew vV

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 …

Member Avatar for Vv IVIatthew vV
0
193
Member Avatar for lulzor

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

Member Avatar for Ancient Dragon
0
36
Member Avatar for n00b3

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; …

Member Avatar for Panda_007
0
5K
Member Avatar for htowa

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 …

Member Avatar for htowa
0
179
Member Avatar for bleedi

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 …

Member Avatar for jonsca
0
231
Member Avatar for saleh-elyani

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 …

Member Avatar for saleh-elyani
0
158
Member Avatar for MrJNV

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

Member Avatar for mrnutty
0
165
Member Avatar for Hand

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"); …

Member Avatar for mike_2000_17
0
130
Member Avatar for MasterGberry

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]

Member Avatar for MasterGberry
0
89
Member Avatar for triumphost

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 …

Member Avatar for jonsca
0
353
Member Avatar for Nandomo

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 …

Member Avatar for mcriscolo
0
126
Member Avatar for ChaseRLewis

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); …

0
55
Member Avatar for MasterGberry

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 …

Member Avatar for MasterGberry
0
157
Member Avatar for OpenSDL

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 = …

Member Avatar for mike_2000_17
0
281
Member Avatar for lochnessmonster

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 …

Member Avatar for mike_2000_17
0
119
Member Avatar for roseworld

Hi, Does anyone have (or know of) VS c++ which performs capture image using Hidden Markov Model, regards,

Member Avatar for roseworld
0
221
Member Avatar for iarkey

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] …

Member Avatar for JZandi
0
161
Member Avatar for Danny1994

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 …

Member Avatar for jonsca
0
236
Member Avatar for tomtetlaw

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; …

Member Avatar for tomtetlaw
0
506
Member Avatar for balgarath

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 …

Member Avatar for zeinab sadat
0
153
Member Avatar for ismailmhd

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:

Member Avatar for Ancient Dragon
-1
49
Member Avatar for eesti44

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 …

Member Avatar for Freude
0
465
Member Avatar for bobsta

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 …

0
85
Member Avatar for kikirkou

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 …

Member Avatar for Narue
0
123
Member Avatar for Wej00

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 …

Member Avatar for Banfa
0
1K
Member Avatar for MasterGberry

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 …

Member Avatar for MasterGberry
0
154
Member Avatar for kra9853

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 …

Member Avatar for Zjarek
0
124
Member Avatar for Rickay

[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; } …

Member Avatar for Rickay
0
628
Member Avatar for MasterGberry

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> …

Member Avatar for MasterGberry
0
226

The End.