49,761 Topics
| |
please help me... i don't know which line of code did i get wrong... the output is supposed to be: 1 12 123 but what i get is: 1 21 321 ...here is my code... i need to use while loop for this. thanks guys. [code=cplusplus]#include<iostream> using namespace std; int … | |
I have this encryption program that I spend hours on. I thought I had it all worked out but no. What could be my problem can anyone help me. You can ignor the void doSet() I will ad that later. Thanks. | |
hello everyone... i wrote a basic program for my C++ class that includes SUMs and while loops. its fairly self explanatory, but i am not getting the correct SUMs for my outputs. apparently, i am missing something extremely important somewhere here. can someone take a look and give me a … | |
I spend 6 to 7 hours each day practicing c++ and visual c++ but end of the day I think I don't have any Test or homework. Please anyone can provide with some site helping with the same. Thanks in advance JIten | |
I am stuck in way with the for loop at the end. The whole idea is to count up to gscreenwidth and then resize the string to make it cut off at 24. We want it to skip the &w or &W anything with an & and 1 character so … | |
Hi I am just learning programming and I was wondering where can I go to get better at writing algorithms? In a few books I have they show simple ones like finding primes/ finding if number are even through loops, but when I read these sometimes I get confused. Then … | |
Hello,i am developing an indexer that indexes html pages.My problem lies in the aspect of creating a global index of all the stored pages in the reprository.I need a method that will be suitable for quick retrieval and insertion of new data.I have tried using STL MAP but i do … | |
Hello, Im new to programming with openCV. I gotta do some geometrical transformations on an image, like translation,rotation, scaling, etc... I still dnt know how transformations are done in opencv. I looked in a cv refenrence manual and found a couple of functions many on resizing and rotation. I tried … | |
Hello I have just learnt recursion & I thought I would try & alter some of my previous funtions to make them recursive, well the 1st function I try to alter totally stumps me & I thought I understood recursion :P Is it possible to make this function recursive? [code] … | |
I want to know how to seek to a point in a file. Example I have a database program with a text file named "info.txt" There are two lines in it: Password = user makes password Activated = true/false How do I make the program find if they have activated … | |
I posted yesterday with some questions about making a mouse utility to replace the double click with a single keystroke. I finally put it all together, and came up with this DLL: [code="cplusplus"] #include "stdafx.h" #include <windows.h> #include <stdio.h> HHOOK hook = 0; bool quit = false; LRESULT CALLBACK ClickProc(int … | |
I am trying to get a list of the Certificates that are in my Cert Store using C++. I can do this in C#, but I can't even find the documentation or an example on how to do this in C++. Could someone point me in the right direction, or … | |
I am currently working on a school assignment which requires us to read and write two kind of derived objects into a file, but i cant seem to read them in correctly once i have saved them into a .dat file. here's what i have got so far: the base … | |
Hi guys i have recently begun exploring encryption and came across XOR though i have attempted to understand it and implement it in reading files and then encrypting it but i cannot understand the decryption process of it at all and keep getting confused [code]srand(time(NULL)); for(index=0;index<MAX;index++) { Matrix[index]=rand()%63000000; KeyFile1<<Matrix[index]<<endl; } … | |
You are required to develop a system to record details of student. This system should be implemented using structure and array. You are required to develop a structure which contains student details such as Student ID, Student Name, Nationality and Gender. You are also required to create a system which … | |
These are my instructions: - create a class containing a 10x10 two-dimensional array of characters. - class must have a constructor that puts the '.' character in each element. - In main, I must allow the user to enter an 'X' into six different spaces in the 2D array. (we're … | |
Hello, I Could not Display data from Serial port. Please check my code and help me how to display data from serial port. The error is "error C3861: 'ProcessChar': identifier not found". I understood, it need to write some code for ProcessChar function to access data. could anybody help me … | |
Hi, i am using visual studio 2008, C++ MFC to do my program. I am doing serial communication. I have a GUI C++ program. At the beginning, i will ask user to choose the com port then connect it. After that, i will need to let the user change the … | |
Hie all I am trying to make my game playabel over a network, Client/Server. I have managed to design the game, i have also managed to create a chat program whereby all clients connect to the server and messeges sent are all received and updated by the server to all … | |
Hello, In the past I had written the following function to parse a string that was tab delimited: [CODE]void parseLine(string s) { string fid, src, dst, cap_e, cap_f, fare_e, fare_f; istringstream isstream (s); getline(isstream,fid,'|'); getline(isstream,src,'|'); getline(isstream,dst,'|'); getline(isstream,cap_e,'|'); getline(isstream,cap_f,'|'); getline(isstream,fare_e,'|'); getline(isstream,fare_f,'|'); }[/CODE] Now I need to parse a string where I … | |
Hi, I need help in understanding nested loops. Here's my problem. I'm asked to write a code that emulates a cash register. Using only while loops and do while loops, and can be with the help of if/else statements. Desired output : Welcome to CrappyMart type (-1) when done to … | |
#include <iostream> using namespace std; double average(int x); int main() { int a,b,c; cout <<"average is:"<<average(a,b,c); cin >>a>>b>>c; return 0; } double average(int x) { return (x+x+x)/3; } | |
Only have Visual Studio 2008 about a week but just ran into something inexplicable to me. This include file (and others like it)... [CODE=C++] //DoTestData.h #ifndef DOTESTDATA_H #define DOTESTDATA_H unsigned int iCreateDB(TCHAR*); unsigned int blnMakeTable(SQL&); int GetRecordCount(SQL&, unsigned int&); unsigned int blnInsert(SQL&, TCHAR**, unsigned int&, HWND, int); unsigned int blnDumpData(SQL&, … | |
How would you write a string that has "are" in it: I beleive this would be a wrong way ? String GetString = [B]"Hello how "are" you"[/B] | |
class B is nested insider class A but it does not declare the class B as its friend. However, the member function void B::print(A a) can access to the private member data int a, b of class A. The books introduce the nested class must be declared as friend then … | |
Hi all, I am having problem about file operations. There are a few numbers in my txt file. I want the program to calculate average of these numbers in the txt file. The code I have written is as below. Number of numbers in the file is 5. When I … | |
I have adapted a program that implements a register of players and stores the players in a struct, with BIN file handling. Now it's not possible to use the records after they have been loaded from the BIN file. The compile is ok and both functions below are excuted without … | |
Hello. First of all, sorry for making the other thread before looking more deeply. I did not make this mistake this time, though. I have a really odd error. I have no idea what might cause it. Here's the error (Gives me two of these). [code] \main.cpp(74) : error C2143: … | |
hi i want to compile .c file as .cpp file using makefile!!. please some one help me to create makefile | |
hey...i'm having trouble passing a user define 2d array... [CODE] void genrand(int &game[][],int &size) { int i,j; for(i=0;i<size;i++) { for(j=0;size;j++) { game[i][j]=(rand()%100); } } } int main() { int size; int game[][]; cout<<"Please enter your Game Size"; cin>>size; genrand(game[][],size); return 0; system("pause"); } [/CODE] This is my code...i read in … |
The End.