49,760 Topics

Member Avatar for
Member Avatar for marlinssmith

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 …

Member Avatar for mrnutty
0
113
Member Avatar for need

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 …

Member Avatar for VernonDozier
1
95
Member Avatar for adi.shoukat

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 …

Member Avatar for Dave Sinkula
0
210
Member Avatar for jakesee

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 …

Member Avatar for Tom Gunn
0
145
Member Avatar for Mark198995

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 …

Member Avatar for Tom Gunn
-1
109
Member Avatar for jakesee

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 …

Member Avatar for jakesee
-1
94
Member Avatar for markrezak

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

Member Avatar for markrezak
0
270
Member Avatar for evilguyme

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.

Member Avatar for evilguyme
0
231
Member Avatar for fuggles

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.

Member Avatar for kvprajapati
0
53
Member Avatar for johndoe123

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.

Member Avatar for Nick Evan
0
10K
Member Avatar for Vallnerik

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 …

Member Avatar for mrnutty
0
127
Member Avatar for akshaydch11

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 …

Member Avatar for Ancient Dragon
0
54
Member Avatar for acidik_4

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 …

Member Avatar for acidik_4
0
80
Member Avatar for I_Empire

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 …

Member Avatar for siddhant3s
0
228
Member Avatar for Tajna

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 :)

Member Avatar for Tajna
0
76
Member Avatar for markrezak

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

Member Avatar for dkalita
-1
433
Member Avatar for nida afaq

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

Member Avatar for kvprajapati
0
138
Member Avatar for baboso

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 …

0
48
Member Avatar for lotrsimp12345

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

Member Avatar for lotrsimp12345
0
1K
Member Avatar for Tajna

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 …

0
65
Member Avatar for walter clark

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 …

Member Avatar for Cosmin871
0
102
Member Avatar for evilguyme

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 …

Member Avatar for evilguyme
0
78
Member Avatar for Darth Vader

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]

Member Avatar for kvprajapati
0
120
Member Avatar for lotrsimp12345

the problem seems to be in the show_int_sllist(). main [CODE] #include "My_Int_Sllist.h" #include <iostream> using namespace std; int main() { //Test1 my_int_sllist b; b.push_back(10); b.show_int_sllist(); return 0; } [/CODE] INTERFACE NODE [CODE] //class used to create a node class my_int_node { public: //member that stores the nodes data value int …

Member Avatar for lotrsimp12345
0
125
Member Avatar for aomran

Hi everyone, Can anyone tells me what this error means: error: decrement of read-only location. thanks

Member Avatar for aomran
0
2K
Member Avatar for michaelcadungog

Hi guys, Could someone help me on this, the problem is: Using array, Ask for 10 integer inputs then display the frequency distribution of the inputs. say, [B]Example Output:[/B] Enter input 1: 2 Enter input 2: 2 Enter input 3: 3 Enter input 4: 4 Enter input 5: 5 Enter …

Member Avatar for VernonDozier
0
182
Member Avatar for nhuan

Hi, I am new at c++ and am currently trying to write a function that throws 10 six-faced dices. However, I need to use the results of the dice throws in another function (that puts them in an array). How can I achieve that. For now this is the only …

Member Avatar for VernonDozier
0
90
Member Avatar for vignesh_ramji

Heyy im a 12th grade student trying 2 put pictures in my cricket project i have 2 display pics of all players i have a code but it works only for some pictures at times it crashed down and pc shuts down any1 has a proper code to display 256 …

Member Avatar for vignesh_ramji
0
184
Member Avatar for gretty

Hello I am unsure of the correct way to make this function below(multiply) stop if a condition is true? The reason why is because of the function type, its not an int, string, void etc, I am unsure how to stop a function whos type is the class name? Do …

Member Avatar for StuXYZ
0
90
Member Avatar for shopnobhumi

i am trying to compile it (ms visual c++) but it is not compiling, i guess there is some errors but visual c++ is only saying fatal error which i have no idea what it is.Any idea? [code]#include "stdafx.h" #include <iostream> using namespace std; int nbs=0; void Queens(int nn, int …

Member Avatar for NathanOliver
0
112

The End.