49,761 Topics

Member Avatar for
Member Avatar for digitalhero

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 …

Member Avatar for mrnutty
0
103
Member Avatar for kernel>panic

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.

Member Avatar for VernonDozier
0
391
Member Avatar for xiikryssiix

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 …

Member Avatar for xiikryssiix
0
244
Member Avatar for jiten_raulo

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

Member Avatar for jiten_raulo
0
139
Member Avatar for Democles

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 …

Member Avatar for Dave Sinkula
0
119
Member Avatar for aodpreacher

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 …

Member Avatar for mrnutty
0
99
Member Avatar for codedhands

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 …

Member Avatar for codedhands
0
145
Member Avatar for Muaz AL-Jarhi

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 …

Member Avatar for hemant_chawla89
0
155
Member Avatar for gretty

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

Member Avatar for Tom Gunn
0
113
Member Avatar for kernel>panic

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 …

Member Avatar for kernel>panic
0
180
Member Avatar for VBNick

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 …

Member Avatar for VBNick
0
144
Member Avatar for AceiferMaximus

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 …

0
63
Member Avatar for acidleaf

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 …

Member Avatar for acidleaf
0
210
Member Avatar for ichigoSJ

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; } …

Member Avatar for tux4life
0
111
Member Avatar for xfreebornx

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 …

Member Avatar for xfreebornx
0
248
Member Avatar for ihatestarch

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 …

Member Avatar for Nico è...
2
2K
Member Avatar for jp071

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 …

Member Avatar for Nick Evan
0
329
Member Avatar for nicholasamh

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 …

0
82
Member Avatar for nelsao1

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 …

Member Avatar for sybarite29
0
2K
Member Avatar for k007

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 …

Member Avatar for k007
0
104
Member Avatar for KungFuTze

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 …

Member Avatar for KungFuTze
0
2K
Member Avatar for xfreebornx

#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; }

Member Avatar for thug line
0
92
Member Avatar for Frederick2

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&, …

Member Avatar for Frederick2
0
114
Member Avatar for Lukezzz

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]

Member Avatar for Lukezzz
0
95
Member Avatar for dennis.wu

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 …

Member Avatar for dennis.wu
0
2K
Member Avatar for esesili

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 …

Member Avatar for mrnutty
0
128
Member Avatar for Sune

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 …

Member Avatar for Sune
0
147
Member Avatar for metalclunch

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

Member Avatar for vibs123
0
179
Member Avatar for kaustubha.s

hi i want to compile .c file as .cpp file using makefile!!. please some one help me to create makefile

Member Avatar for Salem
0
80
Member Avatar for gopi17

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 …

Member Avatar for mrnutty
0
159

The End.