49,755 Topics

Member Avatar for
Member Avatar for biesczadka

[code] void read (std::istream & _input) { string linijka; vector<string> entry; string laaa, naa; int ii=0; while (getline(_input,linijka,'\n')) { cout<<"current line:"<<linijka<<endl; while(linijka[ii] != ',') {laaa+=linijka[ii]; ii++;} entry.push_back(laaa); ii++; cout<<entry[0]<<endl; laaa.clear(); while(linijka[ii] != '\n') {laaa+=linijka[ii]; ii++;} entry.push_back(laaa); //doing something with entry ii=0; laaa.clear(); linijka.clear(); entry.clear(); } } [/code] my csv file …

Member Avatar for mrnutty
0
80
Member Avatar for john butler
Member Avatar for Narue
0
154
Member Avatar for harryhaaren

Hey all, I've tried many times to write a C++ class around a C library to make a nice clean interface to that library. Now I keep on getting the same problem: Once in the class, I initialize the C library, and then the C library complains that EG: error …

Member Avatar for harryhaaren
0
439
Member Avatar for لولوة

Can anyone explan the main idea of using set and get function , because im confusing between them .:-/

Member Avatar for Dave Sinkula
0
210
Member Avatar for BobFX

Hi, I am trying to make and use my own DLL within a C++/CLI project. The DLL project contains an header utc.h file with the following declaration: [code] namespace utc { __declspec(dllexport) void dthr (int dt[3], int hr[3]); }[/code] The source of the dthr.cpp file starts with: [code] namespace utc …

Member Avatar for Excizted
0
174
Member Avatar for Excizted

Hi all :) Currently I have a console for my program, which in short words, executes the function named what you write. The thing is, the functions needs, for several reasons, to be members of a class. Currently I have the code below. Manager is a class that needs to …

Member Avatar for Agni
0
143
Member Avatar for kevintse

Hi, everyone. I am stuck in such a situation: When failing to open a file, of which the name is in Unicode, I need to show the user something like "Can't open file: \My Document\file-name-in-unicode.txt" by throwing an exception . I often use exceptions this way(is this a good way?). …

Member Avatar for kevintse
0
3K
Member Avatar for new programer

Hello all I was looking into some textbook solution (preparing for my exam) and I saw this program: Question Details: write a program that reads in a set of positive integers, representing test scores for a class, and outputs how many times a particular number appears in the list. you …

Member Avatar for vmanes
0
126
Member Avatar for manosha

hi 2 all, I have an assignment about classes, everything IS OK , except of the draw function of a square.(after running the prog. there is no square drawn ) this wt I did till now:[CODE] class Square{ private: int sidelength; char ch; public: Square();//default constructor void setSidelength(int);//sets default values …

Member Avatar for jBat
-4
131
Member Avatar for _Michael_

I am making a command line program that finds factors of a number that the user enters. At the moment the user could enter something like this: '768r7fg38gf8320rf' which returns an error. I would like to restrict the user so they can only enter numbers (0 - 9). How would …

Member Avatar for WaltP
0
119
Member Avatar for hmadison1984

Hi, this is my first time here and I have a problem. I am trying to write a C++ program in Unix that gives me the Gregorian calendar with exceptions to leap year. I have all of my algorithms for calculating days, printing out the months, and such. My problem …

Member Avatar for WaltP
0
217
Member Avatar for bhas_purk

hi guys, I am getting this weird problem when I sort items in a listview control. Initially when my list has few items, it sorts fine. When the size of the list increases beyond a certain number of items, around 1000, then the LPARAM pointers passed to the sort function …

0
82
Member Avatar for lucky_43

hello guys I want to make a c++ program which is designed to receive some elements of a linked list by the user in a (while switch formula) and then the user can delete a specific value that he can designate . my problem is in delval function which delete …

Member Avatar for lucky_43
0
91
Member Avatar for MKO

:-/I'm getting the following error when I debug this small test programm . I can't find anything wrong with it. Even on MSDN they come up with a two line sample code which generates that fault code. In other words, they have no clue either. I hope that some one …

Member Avatar for Salem
0
124
Member Avatar for begueradj

Hello, I would love to create in C/C++ an array in which each cell is a pointer on a linked list of integers: can someone tell me how can I implement this ? Thank you very much for your help Begueradj

Member Avatar for begueradj
0
99
Member Avatar for kawal.singh

Hello Helper, This is my code. I want to compress the file encrypted and then decrypt the same original file.Can you help ? /* [CODE]#include<iostream.h> #include<conio.h> #include<fstream.h> #include<stdio.h> #define ENCRYPTION_FORMULA (int)Byte+25 #define DECRYPTION_FORMULA (int)Byte-25 int Encrypt(char *FILENAME,char *NEW_FILENAME) { ifstream fin; ofstream fout; char Byte; char NewByte; fin.open(FILENAME,ios::in,ios::binary); fout.open(NEW_FILENAME,ios::out,ios::binary); if(!fin) …

Member Avatar for Rajesh R Subram
0
179
Member Avatar for rahul8590

Well for past few months now i have been doing my research on encryption cipher and i have tested on plane text , its not a problem . If i have to test the fastness of the cipher i got to try it on movie and audio files and check …

Member Avatar for rahul8590
0
709
Member Avatar for new programer

Hello all, what is the difference between [CODE]*grade++ *(grade++) (*grade)++ ++*grade *++grade *(++grade)[/CODE] please with examples... I didn't understand manipulationg pointers very well help asap

Member Avatar for Ancient Dragon
0
74
Member Avatar for Burnout

Hi, I've been revising object orientated programming, and decided to have a look at accessing parts of my code in other files. The problem is, I get error messages such as "Player1" not declared, and I can't figure out how to declare them. For example, in my main.cpp file I …

Member Avatar for pspwxp fan
0
122
Member Avatar for Geek-Master

I have been reading about pointers, which IS confusing. I'm sure there is a purpose, but I don't know why I need them yet. For example [CODE] [COLOR=Red]var1 = 23;[/COLOR] [COLOR=Blue]// assigning 23 to var1[/COLOR] [COLOR=Red]var2 = var1; [/COLOR] [COLOR=Blue]// assigning the value of var1 to var2[/COLOR] [COLOR=Red]var3 = &var1;[/COLOR] …

Member Avatar for new programer
0
486
Member Avatar for pink16

im just a 1st yr college student.can u help me this problems? Compute the power of a number given the base and exponent. Do three versions of this program using a while loop, a do-while loop and a for-loop

Member Avatar for jonsca
-1
91
Member Avatar for dchunt

Say i have this 10,000,000 (10 million) byte file. I want to perform multiplication,addition and few other operation on all those bytes(total of 5). And after it is done say if i want to repeat the addition and other operations on the same file like a loop,then How many such …

Member Avatar for jonsca
0
827
Member Avatar for yanseung

Hello, Please help me to resize BMP image to bigger and smaller. Actually I'm trying to build PC wallpaer image with some function. And changing wallpaper has no problem but I want to change any image to screen size. Since desktop screen has some infomation section, bmp image should resized …

Member Avatar for Excizted
0
441
Member Avatar for sara_sara

I see a runtime error wz message "Unhandled exception at 0x009f5900 in trial4.exe: 0xC0000005: Access violation reading location 0xcdcdcdd5." each time I run the following code. // trial4.cpp : Defines the entry point for the console application. // [CODE]#include <iostream> #include <fstream> #include <string> using namespace std; #define NULL 0 …

Member Avatar for Excizted
-1
95
Member Avatar for pac-man

Hi guys, I understand the difference is that the params of ctor 2 are declared const with n being passed by reference. However, I don't seem to understand what difference having these params (n and a) declared constant with n being passed by reference makes? I mean, I'd understand the …

Member Avatar for Excizted
0
128
Member Avatar for manosha

hI 2 all, plz I need help in this program I need to draw a right-angle triangle, but empty from inside. this what I did till now: #include <iostream> using namespace std; void main () { int n; int i=1,j; cout<<"Enter the length"; cin>>n; while(i<=n) { j=1; while(j<=i) { cout<<"*"; …

Member Avatar for jonsca
-2
91
Member Avatar for rgpii

I am attempting to program a doubly linked list template. My program is setup with the class node defined in a header file,the list itself in a header file and finally the main in a separate cpp file which calls the list header. The list header calls the node header. …

Member Avatar for Agni
0
113
Member Avatar for xzero_x

Write a program that will correct a C++ program that has errors in which operator, << or >>, it uses with cin and cout. The program replaces each (incorrect) occurrence of cin<< With the corrected version cin>> And each (incorrect) occurrence of cout>> With the corrected version cout<< For an …

Member Avatar for SgtMe
0
315
Member Avatar for rajif desmara
Member Avatar for WaltP
-1
37
Member Avatar for jan1024188

I want to know how to write a program that moves for example C:\ex.exe to D:\ex.exe.... What header to use? stdio.h? what function to use? Can i get a link of source(this program) ?

Member Avatar for luigi10011
-2
20K

The End.