49,757 Topics

Member Avatar for
Member Avatar for minnie19

Good Day, I will be starting a course in C++ soon and i was just looking over the internet for some examples and practise questions. I found this question very interested as these topics are on the course outline. Is it possible for you to assisst me in doing this …

Member Avatar for minnie19
-1
303
Member Avatar for TayKaye

This is my code which determines it a lottery number is a winner or a loser. I have specific numbers that it needs to go by. My code compiles and it congratulates the user if when I type any of the numbers, however, if I type in 12345 or several …

Member Avatar for TayKaye
0
487
Member Avatar for mskittles

Hi everybody, I am not new to c++ but am far from a intermediate. I would appreciate any help or suggestions. However, my problem is I need to store dynamic data into different variables. For example time. I am trying to write an if statement that would take time store …

Member Avatar for mskittles
0
78
Member Avatar for myk326

I simplified an issue I'm having in another program with the small program here. The program is supposed to open the file with function openFile(). Then I want to initialize char a to the first character in the file via function accessFile() and output that character. My problem seems to …

Member Avatar for myk326
0
97
Member Avatar for mitrious

The book asks me to do the following: Note that the function from the previous exercise and the functions from §6.2.2/113 and §6.2.3/115 do the same task. Merge these three analysis functions into a single function. the three functions are: [CODE]double average_analysis(const vector<Student_info>& students) { vector<double> grades; transform(students.begin(), students.end(), back_inserter(grades), …

Member Avatar for mitrious
0
139
Member Avatar for lelejau

how can I hook the LoadLibraryA API? I am googling a lot but I can't find any piece of code that helps me doing what I want to. I just want to intercept it and display in a message box what is the name of the DLL that the program …

Member Avatar for mike_2000_17
0
1K
Member Avatar for cppgangster

Hi, Thank you for helping. My source: [CODE] #include <iostream> #include <cstdlib> #include <exception> using namespace std; void MyQuit(); void mamama() throw(char *); set_terminate(MyQuit); int main() { mamama(); return 0; } void MyQuit() { cout<<"Uncaugh specification!\n"; } void mamama()throw(char *) { throw "this is end!\n"; exit(5); } [/CODE] And I …

Member Avatar for mike_2000_17
0
145
Member Avatar for caut_baia

Hello everyone.I just have a curiosity which i think i won't be able to satisify by myself. Say we have this function : [code] extern "C" __declspec (dllexport) void whatever () { printf ("%s","whatever"); } [/code] if you try to call it from a process like this [code] typedef void …

0
58
Member Avatar for DrueY

I've got this "simple" Fast Fourier transform code here, but being a beginner I'm not sure how to use it! I just want to know what the required input is, how do I input it, and what is the output? Can someone give me a hand at interpreting this please? …

Member Avatar for DrueY
0
122
Member Avatar for heidik

Hello Everyone. Could anyone please help me solve this problem. I am actually new to using STL. I have been given a task of searching a file of over 60000 records. The data extracted from the file is stored in struct and that struct is in turn stored in vectors …

Member Avatar for heidik
0
838
Member Avatar for Violet_82

Hi guys, quick question. Does the structure [CODE] try { } catch { exit(0); } [/CODE] require the preprocessor directive [CODE]#include<cstdlib>[/CODE] to be declared at the beginning of the program? The thing is if I don't declare it the visual c++ compiler works fine but if I try in Unix …

Member Avatar for thelamb
0
161
Member Avatar for sahil1991

hi, i hav borland 5.02 compiler running on my win7 64-bit compiler,it is not supporting <graphics.h>header file,can some1 tell me plz hw to fix this problem?......... thanx in advance

Member Avatar for mike_2000_17
0
182
Member Avatar for hezekiahpk

I am just starting a programming class in C++ and my teacher hasn't taught anything about writing pseduocode and programs, yet expects us to be able to do so. I need help!!!! 1. Write out a complete algorithm in pseudocode for the following: User enters two uppercase letters or two …

Member Avatar for safuan_1990
0
1K
Member Avatar for ehsantl

Hi guys I'm struggling to write a code for traversing a directed graph. It contains City as nodes. I'm trying to put City(s) to a LinkedList and then work with them to find the path. However, as you will notice I'm still newbie in C++. I have a *nextcities as …

Member Avatar for alwaysLearning0
0
137
Member Avatar for effizy

Hello All, Back again...Working on a program which requires that the user should be able to interact with the program. The objective of the program is this: A class called unique-bag which will store integers using dynamic array. This class stores only one copy of any given integer (no duplicate …

Member Avatar for ixmike88
0
146
Member Avatar for mike_2000_17

Hey y'all, I have been working on a tensor library (Nth-order multi-dimensional arrays) and I've been having trouble coming up with a good scheme for a multi-dimensional iterator template. Basically, I have a class template "tensor_container" which stores all the values of the N-order array (as a std::vector of one …

Member Avatar for mike_2000_17
0
248
Member Avatar for Tom83B

Hi all! This is from my code: [CODE]struct R3 { float x; float y; float z; R3(float, float, float); R3(); }; R3::R3(float a, float b, float c) { x = a; y = b; z = c; } R3::R3() { x = 0; y = 0; z = 0; } …

Member Avatar for Tom83B
0
112
Member Avatar for wildrider30

Hi there, Could some1 tell me whats wrong with this code...I know i shudnt b using an int variable but whats the right one for a string... [CODE] #include <iostream.h> void main() { int a,b; cout <<"Enter the first name"; cin >>a; cout <<"Enter the 2nd no"; cin >>b; ((a=="Tom") …

Member Avatar for DubyStev
0
394
Member Avatar for Jsplinter

I've read the documentation [URL="http://msdn.microsoft.com/en-us/library/ms644906(VS.85).aspx"]link[/URL] and several threads explaining how to make a timer. Now after hours I still can't get my test to work. In the testDlg.h header I declare: [code] UINT_PTR m_uTimerId; CString textControl1; // Controls an Edit Control afx_msg void OnBnClickedButton1(); afx_msg void OnTimer(UINT_PTR nIDEvent); int myX;[/code] …

Member Avatar for Jsplinter
0
1K
Member Avatar for BarnacleBoy

So I'm trying to write this time keeping code for a project of mine. Basically, I'm adding 0.01 to a variable over and over again. While (A < B) { X = X + 0.01 A = A + 1 } I have written down the basic idea. The problem …

Member Avatar for vijayan121
0
214
Member Avatar for debasishgang7

I want to make a program which will send POST request to a web server. And also able to send required cookie(provided by me). Example. [url]http://www.somesite.com/requesthandler.asp[/url] POST DATA::::::::name=some_name&age=19 //i will provide the post data Cookie to be sent::::JHFFHJBSVB848X489CNU98C4Y //I'll Provide this cookie My desired application should POST the "POST DATA" …

Member Avatar for ixmike88
0
162
Member Avatar for Bigbrain99

Hi guys, I know what is meant by vector <string> myvector as it will just take every inputs as string when we are trying to store the inputs in myvector. e.g. myvector.push_back(nick) but what about if we declare the type of vector become like vector <FLATMATE> myvector? Why it won't …

Member Avatar for Bigbrain99
0
102
Member Avatar for eme21

What is a differrent between sorted and unsorted lists? The important points...

Member Avatar for LevyDee
0
73
Member Avatar for rramyaasmi

[CODE]i have problem in running c++ program.iam getting more errors .can u help me to run it.[/CODE]

Member Avatar for rramyaasmi
0
240
Member Avatar for jmt627

Could someone please give me some advice as to why, when I run my program I get a segmentation fault? The code is posted below: #include <stdio.h> #include <stdlib.h> #include <iostream> using namespace std; typedef float Elem; struct Vector { unsigned short int size; Elem* array; }; // Instruct user …

Member Avatar for Ancient Dragon
0
111
Member Avatar for stereomatching

[code] Mat_<double> const affine = (Mat_<double>(2, 2) << 0.5, 1, 0, 2); Mat_<double> coordinate = (Mat_<double>(2, 1) << 20, 3); Mat_<double> C(2, 1); C = affine.mul(coordinate); // this line would crash the program C = affine * coordinate; // this line is ok [/code] I don't why and how, did …

0
74
Member Avatar for garu525

I would like to program that reads a file with 6 lines that have 7 numbers on each line. The output should save a file with sum, average, max and min of each line. For now I just have to figure out how to get the max and min numbers …

Member Avatar for garu525
0
293
Member Avatar for Bigbrain99

Hi guys, I just started to learn class in C++ and get confused by some of the codes [code]class FLATMATE { string name; public: FLATMATE() { name = "";} FLATMATE(string n){name = n;} string getName(){return name;} void setResident(string n){name = n;} }; //Below are the base class for different duty …

Member Avatar for Bigbrain99
0
101
Member Avatar for aznlitomik3

Hi, This is what I have done so far (below) I'm having a problem with the spacing as shown in the output (below the code) Can anyone please help me fix the spacing? Thank You!! ************************************************** ************** CODE: [CODE]#include <iostream> using namespace std; void question (int input); void calendar (int …

Member Avatar for Lerner
0
144
Member Avatar for javanub123

hai, i was wondering if you guys had any advice on getting into game programming with c++ i have a pretty basic understanding of the language and was trying to find out how to do this kind of stuff but so far i havnt been able to find out much. …

Member Avatar for javanub123
0
213

The End.