49,757 Topics

Member Avatar for
Member Avatar for localp

I need to know how to work this out, say for example i have a method is C++ that is helloworld(), and i need to call it from a C program. [CODE] // in my C++ program void helloWorld(){ // some code; cout<<"hello world"; some code..... }[/CODE] [CODE]This is my …

Member Avatar for Narue
0
298
Member Avatar for Arbus

Hello friends.Can anyone help me in this.Here is the code. [CODE]circle(320,240,100); textmode(BW40); cout<<"\n\n\n\n\n\n\n\n\n\n\t\thello";[/CODE] The problem is hello is displayed without circle.

Member Avatar for JSPMA1988
0
127
Member Avatar for MasterGberry

So I am new to maps, vectors too, but I read a guide on those. And I need to do one thing with the map that I haven't figured out yet. Implement this C# code into C++ [CODE]map.TryGetValue(oldValue, out newValue)[/CODE] In the C# code map is a dictionary, so I …

Member Avatar for MasterGberry
0
141
Member Avatar for ziggystarman

Hi Just written a small C++ program to try the Public & Private Key Algorithm process, the program seems to function properly as intended in that it decrypts a message sent from Bob using Alice's Public key. [CODE]#include <iostream> using namespace std; /*********************************************************** XOR Process for both encryption/decryption processing ***********************************************************/ …

Member Avatar for ziggystarman
0
4K
Member Avatar for tchild

Hello I am working on this program and I cannot seem to get it working. I am trying to get an input of a line using cin.getline() but i am unable to get that line and assign it into an array of characters. Everything compiles correctly but the alphabet[50]'s output …

Member Avatar for ravenous
0
132
Member Avatar for xagutxu

Hello: I am trying to create an audio processor, and I have a program that creates some threads (in Windows). The "main" program creates the audio processor thread, and then creates the audio reader thread. I would like to know how the audio reader can tell the processor that the …

Member Avatar for Narue
0
246
Member Avatar for aplh_ucsc

Can u guys help me to find errors of this programme! [CODE] #include<iostream> #include<conio> #include<string> using namespace std; string employeeName; int employeeNumber; double employeeSalary; char employeeType; class Employee{ private: string employeeName; int employeeNumber; double employeeSalary; string employeeType; public: void promotion(){ calc_salary('pr'); } void demotion(){ calc_salary('de'); } void calc_salary(char ch){ float …

Member Avatar for Narue
0
100
Member Avatar for Danny1994

Hello programmers out there :) Im currently having problems with allowing the "-" in my TextBox. [B](Im using Visual Studio 2010)[/B] Im kinda new to programming, thats why this code looks messy. [CODE]void Form1::textBox9_KeyPress(System::Object^ sender, System::Windows::Forms::KeyPressEventArgs^ e) { if(!Char::IsDigit(e->KeyChar) && (e->KeyChar != 0x08) && (e->KeyChar != 0x6D)) e->Handled = true; …

Member Avatar for Danny1994
0
321
Member Avatar for trickx

hi!..i really need some help.. i need to print a pyramid pattern shown below in c++ language using a nested for loop... 1 1 2 1 1 2 4 2 1 1 2 4 8 4 2 1 1 2 4 8 16 8 4 2 1 1 2 4 …

Member Avatar for subtracktor
0
132
Member Avatar for empror9

hello, i want to write a simple university programme please first see my code [CODE]#include<iostream> #include<string> #include<vector> using namespace std; class subject { string code; public: void create_code(); void list_of_code(); }; class student { string name; public: void create_student(); void list_student(); }; int main() { int size_of_student,size_of_subject; student student_attributes; subject …

Member Avatar for empror9
0
107
Member Avatar for undertaker705

Hi, When I compile my class, I find a serious error C2558 no copy constructor available or copy constructor is declared 'explicit' My copy constructor is not private and not explicit ! I don't have any idea about this error Help me please. My class is : Cnoeud.h #include "Csequence.h" …

Member Avatar for subtracktor
0
263
Member Avatar for Salamu

Hi, I have a problem, I dont know how to import data into a single array and then output it to the screen. I am quite new to c++ and would approciate your help. Here is information: When a vehicle has been manufactured, it has the following attributes: make (e.g. …

Member Avatar for Clinton Portis
0
135
Member Avatar for bman214

Hello! I am making a text-based game (I am new to C++) called The Final Journey (I made the name up, didn't copy) and I have had some trouble with the code. I am using Dev-C++ (I plan to get VC++), just so you know. Here is what I have …

Member Avatar for bman214
0
203
Member Avatar for Ahna

Hello I am new to C++ and coding. A few years ago I decided to learn C++ and wanted to start off by making a text based game to start off. So I brought a few books and began reading and doing the tutorials for things like 'Hello World', 'Calculator', …

Member Avatar for Ahna
0
117
Member Avatar for moreautemps

I'm currently developing a screensaver for Windows. I am curious as to how I can get my screensaver to display in the little screensaver selection window in the Control Panel under Personalization. Is it in the Registry or something? Or am I going to have to contact Mr. Bill himself …

Member Avatar for moreautemps
0
111
Member Avatar for imolorhe

What is the integer or double equivalent of the NULL character. That is, the integer that can be entered to represent NULL when using integers (supposing 0 is accepted as a valid integer and not a NULL).

Member Avatar for mrnutty
0
521
Member Avatar for plasticfood

[CODE]for(int i = 0; i < floorNum; i++){ if(floorNum == 12){ continue; { statements; statements; statements; }[/CODE] ------------------- if there anything wrong with this statement? i've tried using a while loop and the continue statement would work and skip number 12, but this doesn't work.

Member Avatar for plasticfood
0
84
Member Avatar for Kosithc

Hello, I have class named cTPS, there are 3 member functions called matrixP_2, matrixP_3 and matrixP_4 for calculating matrixP in three different ways. In constructor of this class I want to initialize a pointer declared in cTPS.h like this: [CODE]cMatrixBase *(cTPS::*matrixP)(void) //pointer MatrixP returning object cMatrixBase[/CODE] I initialize it for …

Member Avatar for Narue
0
147
Member Avatar for xcarbonx

Hi im trying to loop through an input file such as: 333 45 56 67 456 80 90 74 ... First number is id, followed by three exam scores..and the "stud.h" is my struct for each piece of data. My problem is looping through each line of data. Any ideas …

Member Avatar for JSPMA1988
0
119
Member Avatar for benny2010

The header file [code=c] #ifndef DRAUGHTS2_H #define DRAUGHTS2_H #include <SFML\Graphics.hpp> #include "TwoPlayerGame.h" #include <iostream> enum state{intro, playing, gameover}; //the states found within the game enum squareValue{green, red, blank}; //the draught square values on the board class Input { public: Input(); void setInput(unsigned int,unsigned int); unsigned int getX(); unsigned int getY(); …

Member Avatar for benny2010
0
279
Member Avatar for meensatwork

Hello, I have created a C++ dll with some functions and structures.I need to access the structure in my C# program. When i searched the net, i found that there is no way to include header files in c#. What is the alternate way to use the structure definitions in …

Member Avatar for IdanS
0
103
Member Avatar for gyagyus

Hi! I try to implement a matrix template class which inherits the vector of vectors. The message I get: "error C2679: binary '=' : no operator found which takes a right-hand operand of type 'const Vector<T> *' (or there is no acceptable conversion)" (When I call the alternate matrix constructor, …

Member Avatar for xth
0
3K
Member Avatar for sethwb

Hi I'm learning C++ on my own here and am experiencing a problem with an introductory program I've created. My book provided me with a bit of code near the end to prevent my program from closing on me immediately, however it is closing on me as soon as I …

Member Avatar for Narue
0
211
Member Avatar for ivaylo91

Good evening to everyone. I have some troubles with a task I have to do. I need some assistance. Excuse me if I haven't searched thoroughly in the forum and there is a similar topic somewhere. Thank you! [B]Here's the issue:[/B] Compute the minimal and the maximal value of function …

Member Avatar for ivaylo91
0
2K
Member Avatar for kk33

Hi, I got a problem in my winttp code which is connecting to the URL successfully but not able to POST the data to the the server, here is my main part of the code [CODE] hSession = WinHttpOpen(L"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12", WINHTTP_ACCESS_TYPE_NO_PROXY, …

0
99
Member Avatar for electrox73

I get the error in these lines: [CODE]infotxtbox->Text = ("Name: Peter Jaško "Rank: Main Tech Manager, Vice-Leader, "Donated: ?, "Exp: ?"); [/CODE] This code is entered in a header (Form1.h) of a Windows Form Project/Application in C++ in VC++ 2010 Regards

Member Avatar for electrox73
0
692
Member Avatar for dadam88

Just a little code I have been working on. New to programming and learned about rand. I applied it in this program. Like I said I'm new to programming and if there is a *easier and more effective way* to write some of my code, please tell me. The part …

Member Avatar for frogboy77
0
417
Member Avatar for simply_viks

hoy to get the size of array all initialised to as char pste_msg[64]= {1,2,4,5,6,8,6,5}; memset(pste_msg,0,64); sizeof(pste_msg) is giving 64 any help???????? thanks.

Member Avatar for hillstone_softw
0
181
Member Avatar for sha11e

Hey, My codes asks for a number, if the user inputs something else it gives an error message and asked for a number again. If the user inputs a number, it should cout whatever number the user chose. But it doesn't work as intended... I get the error message the …

Member Avatar for subtracktor
0
150
Member Avatar for sairakhalid

[CODE] #include<iostream> #include<time.h> #include<conio.h> using namespace std; class adclist { struct list { int data; list* next; }; public: void makelist(); }; void adclist::makelist() { list** table = new list* [10]; for(int j =0; j < 10 ; j++) table[j] = NULL; for ( int m =0; m < 10; …

Member Avatar for sairakhalid
0
150

The End.