49,766 Topics
![]() | |
So heres the problem. My Grandmother needs to look up stocks, but she has trouble using "FoxFire" to look it up. I need a way where she can enter the name of the stock she wants, and the program enters it into a google search and searches for the stock. … | |
Bellow is the piece of code that causes Segmentation Fault: (in Linux Segmentation Fault is usually due to illegal memory access) else if(intData==3) { FILE *fp; int ch; if((fp = fopen("file.txt","rb"))==NULL) { printf("Cannot open Source file.\n"); exit(1); } while((ch = (int)fgetc( fp )) != EOF) { printf("%s",(char*)ch); send(client, (char*)ch, 1,0); … | |
Hey! Im new to this C++ stuff and the first major problem I run into is a two dimensional array. I have to declare the array and store data values from ANOTHER data file. I have some of the code written down. Please help and tell me what I'm doing … | |
Hello Everyone, I am presently working on VC++ project, i have to create a new airgauge component using activex, [COLOR="Green"][B][U]can you please let me know if there is any better tool for creating a activex component, and i would also like to know if there are any good books on … | |
Hi: I am trying to create a loop for a code. My loop is supposed to find all the combinations using the numbers 1 and 0 depending on the length of my string. For example if I set up my string to be 3 then the program should give me: … | |
Hi Can anyone help me in extracting all the tables and its contents that are present in a MS word document using c++ or C | |
this progran will simulate a process queue, giving time slices based on the priority. The process entries will be in a file, one per line.the data is the start time, priority level, total time to run and process name. when I run the program I got few problem 1. how … | |
Hi, I am trying to write a program that finds the minimun and maximum number in an input set of numbers. I am using a loop to update the set as the program reads the cin. Example code: [CODE]min = max = -1 cout << "Enter termination value that will … | |
Program needs to read the students' first name,last name and test scores.Suppose that class has 20 students.Use an array of 20 components of type studentType. Output : last name followed by comma,space first name , score, revelant grade, and find the highest test score, print names of the students having … | |
I want to write a Code in C which can create copy any given file (txt, bmp, jpg, pdf etc) what i've written so far is: int main(){ FILE *fp; char ch; FILE *fpW; if((fpW = fopen("file2.bmp","w"))==NULL) { printf("Cannot open Destination file.\n"); exit(1); } if((fp = fopen("file.bmp","r"))==NULL) { printf("Cannot open … | |
Hi all, How about this? In this example, what is the correct way to initialise Secret mission? [CODE]class Secret { private: int data; public: Secret(int _data) { data = _data; } }; class Mission { public: Secret mission; Mission(); { } };[/CODE] the only way i know of is using … | |
hello im writing a if statment for class and i cant get the program to terminate if the user goes to the else statement it still prints out the other cout's here is my program your supposed to enter in a id number then the crn of the class u … | |
Hi all, Maybe you can help me with this... in the code [CODE]float dot(const Vec3& v) const { return (x * v.x) + (y * v.y) + (z * v.z);}[/CODE] What is the purpose of the keyword const? Why in the case of [CODE]Vec3 operator=(const Vec3& v) const { x … | |
[CODE]ok ok i got it now right i copy it to vector and sort it..... here is the code #include <iostream> #include <fstream> #include <algorithm> #include <string> #include <map> #include <vector> using namespace std; typedef map<string,int> word_count_list; struct val_lessthan : binary_function < pair<string,int>, pair<string,int>, bool > { bool operator() (const … | |
there is fstream in normal C++ that allows you to do file i/o but how do i do this in managed C++ in a forms application? i read about a config file but i dont quite get it.. thnx. | |
Does anybody know of a good tutorial that could teach me how to use LINQ in C++, I will be using it to communicate my game to an online MySQL database and it will also be reading XML files. | |
Can some help me with a random between two choices ? Something like: L = random(A, B); and in L to have A or B. Thx. | |
I have a question that pertains to any programming language but since C/C++ is my primary language I'll ask it here. I'm designing a test program that will simulate the outcome of a 12 round fight between 2 boxers. Now my question is, is there a limit or number I … | |
![]() | i am just started win32 programming. (NOT through MFC) if i created one dialog box ,on it i created one edit box and a button. now whatever i enter in this edit box i want it to get displayed on another dialog box not by declaring global variables. also how … |
hi Ive been working on a program that finds hidden files copies the contents and then deletes the hidden file so far ive got system("set OLDDIR=%CD%&&@ECHO OFF&&ECHO Finding Hidden Files&&dir /ah&&PAUSE"); printf("Please Choose The Files You Want To repair separated by spaces\n"); scanf("%c",&d1); getchar(); string cmd="echo"+d1; system(cmd.c_str()); but im having … | |
I wrote a template function that converts any numerical value to string : [code] template <class T> string ConverttoS(T input) { std::stringstream out; out << input ; return out.str(); } [/code] now i want to use this template function inside a class , but if i did so i would … | |
Hello! I wonder how and where can I see a sqlite database that i have created in c++, if it is possible at all? I would like to see if the db exist, and what are the inputs, to check if i have inserted valuations properly.. Thank you. T :) | |
//Binary Search Tree Program #include <iostream> #include <cstdlib> using namespace std; class BinarySearchTree { private: struct tree_node { tree_node* left; tree_node* right; int data; }; tree_node* root; public: BinarySearchTree() { root = NULL; } bool isEmpty() const { return root==NULL; } void print_inorder(); void inorder(tree_node*); void print_preorder(); void preorder(tree_node*); void … | |
Hi, there is a simple code,but i cant understand the output: [CODE]#include<iostream.h> #include<conio.h> void main() { clrscr(); int x=10; cout<<++x<<" "<<++x<<" "<<++x<<endl; x=10; cout<<x++<<" "<<x++<<" "<<x++<<endl; getch(); }[/CODE] output: 13 12 11 12 11 10 | |
Hi, I want to download a certificate from a server to memory (i have to write in memory, can not create a file). Then i want to create a certificate with the "CryptQueryObject" function but it does not work and do not why? any help? bes regards [CODE] PCCERT_CONTEXT pCertCtx … | |
[CODE] void my_int_sllist::pop_back() { //head and tail pointers cout<<"enter pop_back"; //contains one node if(head==tail) { cout<<"enter head==tail?"; delete head; head=tail=0; siz--; } else { cout<<"enter's other condition"; my_int_node* temp; for(temp=head; temp->next!=tail; temp=temp->next) { delete tail; tail=temp; tail->next=0; } siz--; } } [/CODE] | |
Could someone please explain me how should I copy datas from c++ into sqlite database. I have installed sqlite and then i have found somewhere information that i also need a sqlite++ wrapper to be able to use sqlite trought c++. so, i have installed both, but i dont dont … | |
Using Visual C++ (CLI type) I can place a rectangle of any width and color on the screen where the ends are defined by the calls to ->MouseDown and ->MouseUp. But I'd like to see the rectangle grow while I'm holding the mouseButton down. It seems like I should be … | |
hmkay so i used shellexecute to open a flv file but it was using flash player. i wanted it to play it using VLC so i uninstalled macromedia flash and now it doesn't play at all.. is there any API/code that can make me choose which program will open the … | |
if I have textBox with a couple of lines, how would it be possible to read line by line in a List<String> ? [code] List<String^>^ ReadEachLine = gcnew List<String^>(); [COLOR="Green"]//How to ->Add each line from TextBox1 ?[/COLOR] [/code] |
The End.