49,761 Topics
| |
Hey guys, well first off i'm a new member here. My question is how do you go about killing/stopping a process? Thanks, Clipper34. | |
Can I use getline to get two lines of string data? for example: [CODE]string line; string myfile; ifstream file; file.open(myfile.c_str()); while(!myfile.eof()) { getline(myfile, line) }[/CODE] | |
Hi, With the same GetOpenFileName(...) I have one problem. when this displays the dialog with files, the time displayed in the date field will not be local time. Instead GMT time. How I can Change this. i.e in the mobile, time is set as GMT + 5.30 New Delhi. At … | |
Here is the header file I was given to use [code] // // ministack.h // #ifndef MINISTACK_H #define MINISTACK_H const int MINI_STACK_SIZE = 5; // Fixed number of element in stack class MiniStack { private: int num; // Number of values stored in MiniStack char* stackPtr; // Pointer to array … | |
Hello everyone. I am trying to create a program that reads these values / strings from a file: 170 Lipstick 250 Orange Crush 350 Chickadee 450 Green Grass 550 Monaco 750 Toffee Crunch Then I am supposed to create a menu that prompts the user to provide either the number … | |
ok, so I just started looping today and the simpler programs are all right, but we got a pretty complex assignment which I am pretty lost on. here's the assignment: [I]Write a program that updates a person’s bank balance based on withdrawals and deposits. Ask the user to enter the … | |
Im currently using turbo explorer as IDE, kinda new to it and was testing some functionalities and ended up trying to save and load images from MySQL. So I had this one to grab images from file to form: [code] void __fastcall Tcharacter::openClick(TObject *Sender) { OpenPictureDialog1->Execute(); EditBox1->Text = OpenPictureDialog1->FileName; Image1->Picture->LoadFromFile(EditBox1->Text); … | |
I've been overloading some methods for a template class. This means I can write my code in this way. [CODE=c++] myClass var3=var2+4; [/CODE] Is it possible to do it the otherway around like [CODE=c++] myClass var3=4+var2; [/CODE] I know that the end result will be the same, I was just … | |
Hi, I am trying to replace a few text strings in a text file (test.txt), and then makeing some spaces, for it to be easier to read Anyone have an example I can use, because I am new to C++ I just want to replace "word1" with red "word2", and … | |
I'm working on a project graphical based authentication and i need to implement this with C++. I need to understand this concept and all the books i ve read, none has really explained it well. Please I need help and badly. | |
How do I input a string then output a vector from this function? The compiler doesnt seem to like "while(invector>>word)". [CODE]vector<string> example (string invector);//prototype vector<string> example(string invector) { string word; stringstream insert(invector); vector < string > vectemp; while(invector >> word) vectemp.push_back(word); for(int i = 0; i < vectemp.size(); i++) cout … | |
I was wondering if anyone had some source code/snippets of code that can: - Move a a file (I guess copy -> paste -> delete old one) - Rename a file. - Locate whether a file is in a certain place? Im using XCode on a mac. Thanks | |
Hello, I would like to know if I can invoke an applet method from C++. This method is loaded in a web browser. For example, the applet is called app and I want to invoke "app.Zoom(2)". Thanks. | |
Hello! I’ve started a project that allows users to edited wav files (flange, distortion) and but them in a sequence and make a loop. I want to be able to visualize the actual sound wave of the file (like if you dropped a sound file in Audacity (and then in … | |
[B]filename:[/B] [COLOR="Red"]main.cpp[/COLOR] [CODE=cplusplus] #include <iostream> using namespace std; int main(); using namespace std; #include "BinaryTree.h" int main() { BinaryTree<int> tree[8]; tree[1].makeTree(1, tree[0], tree[0]); tree[3].makeTree(3, tree[0], tree[0]); tree[2].makeTree(2, tree[1], tree[3]); tree[5].makeTree(5, tree[0], tree[0]); tree[4].makeTree(4, tree[2], tree[5]); tree[7].makeTree(7, tree[0], tree[0]); tree[6].makeTree(6, tree[4], tree[7]); cout << "Preorder: "; tree[6].preorder(); cout << "\n"; cout … | |
Hi there! I am just starting out in c++ and so far, its going ok. I have a small problem in a simple program that is frustrating me, so I am hoping someone will point me in the right direction of where I've gone wrong. The program basically prompts the … | |
Hi everyone! I'm kinda n00b in C/C++, All I ever did were some basic programs for some .txt files manipulation. Last time I was working in BC 3.1, about for years ago. Now I got Borland Turbo C++ Explorer 2006 and is a little hard for me to start a … | |
Compile this code with MSVC2005 [CODE] unsigned short x = 20; unsigned short y = 20; for ( unsigned long i = 0; i < x * y ; i++ ) { cout<<i<<endl; } [/CODE] and u get warning C4018: '<' : signed/unsigned mismatch why? i mean, it all runs … | |
Hi all, I have developed an application in C++ using Borland Builder 6. In this app I load a html file which contains an applet stored in a wifi robot so that in my app I receive the image from an IP camera installed on it. The fact is that … | |
Hello, dear all, here is my algorithm. i'm trying to reverse the array but its not function and not loop. [code=cplusplus] #include <iostream> using namespace std; void initial(int *v, int N) { int i; for(i=1; i<=N; i++) v[i] = i; } void write (int *v, int N) { for (int … | |
Hi all I'm using a 'STRING' variable to store the entire contents of a file. Is there any possibility of buffer overflow if the content of the file is large? (eg: say size of the file is 30MB). Thanks in advance | |
Hi guys, I'm new to this but I have no idea what is wrong with my code and I'm going insane trying to figure it out and its due very soon! I would appreciate any help you can give me! Here's my code: [code=cplusplus] #include <iostream> #include <iomanip> #define ROWS … | |
Hi friends :P I'm needing some help on an assignment. I'm really not sure about all the argument-passing and structure references I have been assigned for my C++ class. Any help is greatly appreciated. I'll continue to work on it in the meantime, but I cannot get it to compile … | |
HI I have created an object pool in shared memory each object encapsulates another object which in turn has a socket object which is a pointer Now my question is, should the socket object be created in the same memory region (using overloaded new) as that of pool object or … | |
Hello Friendz, Suppose I have a program like [code] // A.cpp int main() { if(some_condition) return 1; return 0; } [/code] Now from another program I want to run the above program, like [code] //B.cpp int main() { ... ... system("A"); ... ... return 0; } [/code] Here how can … | |
Hi I want to create an array as shown in the class below everything is working fine, but at the end of execution of the program, there is a memory fault Please help me in finding out the problem [code=cplusplus] class a { int i; int arr[]; public: a(); ~a(); … | |
hi you please tell me how to call javascript files from c++ code?i know this(iam not 100% sure) that you first call html files,then from ther you call javascript files. | |
I'm taking the time from an accessor function and if it's from 0-9, so it displays correctly the hour time position, I have the following statements in my main body: [CODE] if (clock1.getHour() == 00) cout<<"The hour of clock1 is 00"<<endl; else if (clock1.getHour() == 01) cout<<"The hour of clock1 … | |
How do I use a pointer with a 2-dim array? I am converting string to char array. char x[25][100]; const char* A= x; A= x.c_str(); | |
I have been working through the book [U]Windows Game Programming for Dummies[/U] and so far it has been excellent. I am about half way through the book and I am planning on finishing. However, the books is from 2002 and it uses DirectDraw7 for the graphics component of DirectX. It … |
The End.