51,593 Topics
![]() | |
HI every one, I need to do a course project for software architecture which should be implementable and is compulsoraily an ieee or acm paper. The areas given for us are: agile s/w developement,extreme programming,cloud computing,web services,generic programming,testing... can u guys suggest any thing in it | |
![]() | how can I input a console-entered string into multiple structure variables? I have the following structure: [code=c]struct MyTime {int hours, minutes, seconds;};[/code] and need to prompt a user to enter a time in format hours:minutes:seconds and then store that time into the structure directly i.e. I can't input a string … ![]() |
Hello, I am having trouble getting my c:param working. I've looked all around the web for a solution. Here's some of the code that I have: test.jsp <%@ page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" language="java" errorPage="" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <html> <head> </head> <body> <c:import url="test2.jsp" > <c:param name="testVar" value="0" … | |
[CODE]// pointers to base class #include <iostream> using namespace std; class CPolygon { protected: int width, height; public: void set_values (int a, int b) { width=a; height=b; } }; class CRectangle: public CPolygon { public: int area () { return (width * height); } }; class CTriangle: public CPolygon { … | |
Hello, I am new to this site and to C++. I have been following a tutorial on how to make a Tetris clone in SDL and C++ from the following site : [URL="http://www.aaroncox.net/tutorials/arcade/FallingBlocks.html"]http://www.aaroncox.net/tutorials/arcade/FallingBlocks.html[/URL] When i was finished going through it all and sorting through all the petty errors I had … | |
An exercise is to write a program that generates random numbers within user specified limits. The program I wrote is as follows and it runs correctly. [code] #include "../../std_lib_facilities.h" void randnum(double lower, double upper, int n) // Generate 'n' random numbers uniformly distributed { // between lower and upper limits. … | |
My assignment is to use pointers to point at the highest and lowest temperatures in the array. I need to have 3 pointer variables and start them at the beginning of the array. Step the pCur through the array using a for loop and pCur++. Loop through the array looking … | |
Hello I am in a question of assigning local scope pointers to global scope pinters. I have a code like this. [CODE]public : char* myValue; void process(TiXmlElement *element) { myValue= element->getText(); }[/CODE] But once the process function is returned value is garbage. So I did this. [CODE]public : char* myValue; … | |
I am practicing Win32 API again, and for some reason, I am getting an error. [code] #include <windows.h> #include <windowsx.h> #define WSIZE = 400 #define HSIZE = 400 LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam); int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { WNDCLASSEX … | |
[CODE]HMODULE g_hModule = GetModuleHandle( 0 ); HRSRC hRes = FindResource( g_hModule, MAKEINTRESOURCE( ID_DLL_MYDLL ), "ID_DLL" ); HGLOBAL hResource = LoadResource( g_hModule, hRes ); DWORD iResSize = SizeofResource( g_hModule, hRes ); BYTE* pData = ( BYTE* )LockResource( hResource );[/CODE] When I included a dll file into my project, I used: [CODE]fstream … | |
Hello, I am trying to read the raw interrupts from a USB mouse (Installed and functional) in a C++ application. I have read over LibUSB and WinUSB but WinUSB does not seem to play nice in Qt and LibUSB seems overcomplicated for what should be a simple task. I do … | |
hello I need help with loading pages that have flash applications in them, my program works for just html pages, would anyone with qt knowledge plz help. TIA. here is my code: [code=c]#include <QApplication> #include <QWebView> #include <QUrl> #include <QWebSettings> int main(int argc, char *argv[]) { QApplication a(argc, argv); //QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, … | |
Hi [code] #include "cv.h" #include "cxcore.h" #include "cxtypes.h" #include "highgui.h" int main() { CvCapture* capture = cvCreateFileCapture("RosewellBst.mp4"); cvNamedWindow( "Example2", 1 ); cvMoveWindow( "Example2", 100, 100); IplImage* frame; while(1) { frame = cvQueryFrame( capture ); if( !frame ) break; [COLOR="Red"]cvShowImage( “Example2”, frame );[/COLOR] char c = cvWaitKey(33); if( c == 27 … | |
Helllo, I am supposed to do the following: [quote] Mathematically, a set is said to be consists of well-defined elements. For instance, the following are well-defined sets. A = {1, 2, 3, 4, 5, 6, 7} B = {2, 3, 4, 8, 9} A set may be described using other … | |
hi there! im trying to do a xor beetwin two cha but i coudl no there is my code: [code=c] String^ val2; String^ val3; String^ val1; String^ val; char *chval1; char *chval2; char *chval3; char *chval; char *chv; val1=GZMK1->Text;//GZMK1 is textbox val2=GZMK2->Text;//GZMK2 is textbox val3=GZMK3->Text;//GZMK3 is textbox chval1 = static_cast<char … | |
Hi! I'm new to C++ and am having a problem with saving a text file into a string. I'm using getchar() but only the last line of the rather long text file is saved into the string when used in different functions. In other words, if I include a "cout" … | |
[B]Can anybody tell me whats d problem..????[/B] [CODE] #include<iostream.h> #include<conio.h> void main() { clrscr(); int l,b,r,a; char ch,t,x; cout<<"******************----MAIN MENU----****************** \n"; cout<<"\n 1.Area of rectangle"; cout<<"\n 2.Area of square"; cout<<"\n 3.Area of circle"; { cout<<"\n Enter your choice"; cin>>ch; } rec:cout<<"\n Enter the Length and breadth"; cin>>l>>b; a=l*b; cout<<"\n Area … | |
programe to randomly generate store and display the age of N studnets (e.g ,18,24,38 etc).the minimum age is 18 and maximum age is 75.N should be equal to 9. 1.How we can intialise all the elements of the array to -1. 2.Randomly generate and store the age of N studnets … | |
Hi.. Can somebody help me with my project in c++? My project proposal that I had submitted is about Question and answer program. It is just like a game. I formulated many questions and their desired answer. The problem is, I want to randomize the question so that it will … | |
Hi all, I can't seem to make the system() syntax work in my program.. I need to run a command from the command line using C++.. I tried a basic example and used this command [CODE]system("cls");[/CODE] instead of clrscr() and executed using my old c++ compiler. It doesn't work. Even … | |
// program implement the working of files simple stock // management #include <iostream.h> #include <fstream.h> #include <iomanip.h> #include <stdlib.h> #include <stdio.h> class stock{ int code; char name[30]; float cost; char flag; public: void getStock(); void putStock(); char getFlag(); void putFlag(char); int getCode(); }; int stock :: getCode(){ return code; } … | |
could u please show me the codes too? (example may be) | |
Hi there. I am getting the errors below when I am trying to compile this code using DEV C++. [Linker error] undefined reference to 'CheckLeapYear'(int) [Linker error] undefined reference to 'CalcDayNumOfYear'(int) [Linker error] undefined reference to 'CheckLeapYear'(int) Id returned 1 exit status Please help. Below I have included my coding … | |
Hi I need to write data which I have successfully read in from a text file, to a new file. The original text file contains data for many objects. The read in data is stored using stl vectors in 3 nested objects: Structure, Polygon and Point i.e. a Structure contains … | |
// Edit window property case WM_CREATE: hwndEdit = CreateWindow (TEXT ("edit"), NULL, WS_CHILD | WS_VISIBLE | WS_VSCROLL | ES_LEFT | ES_MULTILINE | ES_AUTOVSCROLL, 0, 0, 0, 0, hwnd, (HMENU) EDITID,(HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE), NULL); **word wrap calling** case ID_FORMAT_WORDWRAP: bFlag = !GetCheckedState(GetMenu(hwnd), ID_FORMAT_WORDWRAP, TRUE); if (bFlag) { SendMessage(hwndEdit, EM_SETWORDBREAKPROC, (WPARAM) 0, … | |
#include <iostream> using namespace std; int main() { int i,j,k; int Matrix1[3][3] = { {1,2,3}, {4,5,6}, {1,2,3}, }; int Matrix2[3][3] = { {3,2,1}, {6,5,4}, {3,2,1}, }; int Matrix3[3][3]; cout << "Matrix 1: " << endl; for( i = 0; i < 3; i++) { for( j = 0; j < … | |
Good morning, I've got a general question about overloading operators. Suppose you have a class that overloads the + operator and overloads the = operator, if you do something like this length3 = length1 + length2, will you automatically call both the overloaded + and = operator and if so, … | |
Hello I am confused with an error saying. [QUOTE]Error 1 error C2664: 'const char *TiXmlElement::Attribute(const char *) const' : cannot convert parameter 1 from 'char *(__cdecl *)(void)' to 'const char *' c:\GameProject\TheGameProject\ContentManager\src\NodeWater.cpp 38 [/QUOTE] I have a method that returns a const char* as follows [CODE]class XMLNodeNames { public: static … | |
// so guys this how i program about random walk of partilce..somehow... R ~ N^1/2 i got a huge different comparing simulation value and calculation(theoritical) .how i wanna to reduce different i got,,,/ N=number of steps... R= value from therom phitogoras R=(a^2 + b^2)^1/2..... [CODE]#include <iostream> #include <math.h> #include <time.h> … | |
Hello, Me and my development team are not sure how to get a users username/uid from their login on the website into the C++ application. I use PHP Cookies and Sessions for that. Is there anyway that this could work? Thanks. | |
Hey guys I'm writing a program that profiles the speed of different algorithms and I have been using the getTickCount() method in order to do so. However the program is reporting that the algorithm took 0ms. Doesn't have to be too accurate but currently 'RunTime' is coming up as 0. … | |
I tried to do an excercise from Stroupstrup's book. The reader is asked to reverse the order of elements in a vector so that if originally vector[0] = 1, vector [1] = 2, and vector[2] = 3, then new vector has newvec[0] = 3, newvec[1] = 2, and newvec[2] = … | |
Ok, I'm really getting helpful answers from this site!!! Here's my new C++ question: How much code can go in an initializer list? Can I call new SomeClass() to get a pointer to initialize something even if it wasn't in the original argment list? Can I do math on the … | |
Can u plz. explain static scoping and dynamic scoping in c++?? | |
GUYS i want to make a program that used to enter 7-digit number and determine the largest , smallest and the median and average of the seven number i want also to display the entered number its equivalent in binary, ocatal and hexadecimal value the sample output must be like … | |
Dear all, I'm starting to get the hang of this C++ business, but I have one question that I just realized I don't have an answer to. Suppose I want to call a constructor from within a constructor to reduce redundancy in the parts that are identical. I seem to … | |
I am trying to take in inputs from the user for one of my projects. [CODE]cout<<"Enter Event Name (enter 'exit' to quit) ::"; gets(dat.evnm); cout<<"Enter Type Of Event (eg: Dance, Music, 'exit' to quit) ::"; cin>>dat.type; if(strcmp(dat.type,"exit")==0) return 0; cout<<"\n";[/CODE] here the line[CODE] gets(dat.evnm);[/CODE] will not execute, and the program … | |
hi i have a program in which i want to print text in comic sans size 10. how can i do that? | |
I have finished editing the program but I still have a couple of errors that I can't figure out, please help Errors: Error 1 error C2601: 'split' : local function definitions are illegal \\ilabss\home$\D03279277\Documents\Visual Studio 2005\Projects\err\err\err.cpp 97 Error 2 fatal error C1075: end of file found before the left brace … | |
I know the function textcolor() included in conio.h in borland compiler. but this function is not present in vc++. also if you can provide me the text formatting functions,or header file containing it. i will be very thankful.......so please help me......thanks | |
i have the following code........pls point out my mistakes......the first one is the header file and the second one is the file......... class array { int i, a[100],n,d,t,r,c,e[100][100],f[100][100],s,g[100][100],b[100],j,r1,c1; char p; public: void pro(); void enter(); int arrA(int); int arrB(int); int arrAA(int r,int c); int arrBB(int,int); void dis(); }; void array::enter() … | |
I used below codes to pass a value from vector to my cpp file. While i'm doing that, i got segmentation error in my main cpp? Is there anyway to pass the vector value to my main cpp? thx for the help [CODE]void Loadfile() { //cout<<"this is used for loading … | |
EDIT: I figured it out. I do not know how to delete threads. Sorry. I need to return a pointer to a new array. The new array must be the same as the old one, just in reverse. I have it all done except for one little part. I can't … | |
Hi all, I am totally new to C++. I began learning C++ some 2-3 months back referring to youtube tutorial channels and now by reading a book by Robert Lafore. I practice when i get free time. I still have long way to go. Well, referring to some examples that … | |
I need to write a function that accepts int array and array's size as arguments. Then the function should create a copy of the array, except that the element values is in reverse in the copy. The function should return a pointer to the new array. I am having a … | |
I am looking for a good and neat looking C compiler ! Can I do ANSI C programs in Microsoft's Visual C++ 2010? If then ,HOW? please give me the step by step instructions to accomplish that task? Are there any other good compilers? is dev c++ good enough? Right … | |
I am having trouble with this simple program to display three numbers entered from highest, medium, lowest. Specifically, with the ouput_result void function. Stuck, and not sure what I am doing wrong. Fairly new to C++, this is my first course in C++. Any help would be appreciated. #include <cstdlib> … | |
Hi i want to compress data in c++. eg; aaabbcccc then the program shut outpu: a3b2c4 PLZ HELP this is a very important assignment | |
#include<iostream.h> #include<conio.h> #include<fstream.h> #include<stdio.h> #include<string.h> #include<dos.h> #include<stdlib.h> void display() { clrscr(); cout<<"press: " ; cout<<"\n 1:ADD RECORDS \n 2:RETRIEVE RECORDS \n 3:READ RECORDS \n 4:quit"; } void main() { clrscr(); display(); char choice; cout<<"\nEnter your Choice:"; cin>>choice; switch (choice) { case '1':addrecords();break; case '2':retrieve();break; case '3':readrecords();break; case '4':break; default: cout<<"Only … |
The End.