51,593 Topics

Member Avatar for
Member Avatar for mustafaneguib

ok guys, i can not figure out the following problem that i faced just a while ago while trying out some filing in c++. the code is as follows: [code=c++] #include<iostream> #include<fstream> #include<string> using namespace std; int main() { ifstream readFile; readFile.open("Input.txt"); string sample; readFile>>sample; cout<<"Here is a line: "<<sample<<endl; …

Member Avatar for Nick Evan
0
365
Member Avatar for addikted

hi.can u plz tell me where to put printf for timecount.here is the code for quicksort i wanted to calculate the time it takes. [CODE]#include< stdio.h> #include< conio.h> #include <time.h> #include <ctime> void shellsort(int a[],int n) { int j,i,k,m,mid; for(m = n/2;m>0;m/=2) { for(j = m;j< n;j++) { for(i=j-m;i>=0;i-=m) { …

Member Avatar for rahul8590
0
664
Member Avatar for number87

when I try to compile my project file in devcpp I get the following error: I tried googling but nothing seems to help when i tried them. CreateProcess((null), C:/cygwin/bin /sh.exe -c "g++.exe -c test.cpp -o test.o -I\"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include\" -I\"C:/Dev-Cpp/include/c++/3.4.2/backward\" -I\"C:/Dev-Cpp/include/c++/3.4.2/mingw32\" -I\"C:/Dev-Cpp/include/c++/3.4.2\" -I\"C:/Dev-Cpp/include\" ", ...) failed. Access is denied. C:\Users\dedl\Desktop\SAIM\SAIM3\OpenGLGLUT\Makefile.win [Build Error] …

Member Avatar for number87
0
3K
Member Avatar for jefanot

Hey, I wrote this code that makes you type two things, then it checks if it is the same. Well, that was it was supposed to do, but then it kept saying: expected primary-expression before "else" expected ';' before "else" Here's the code [CODE] #include <iostream> #include <time.h> #include <windows.h> …

Member Avatar for muzamal
0
1K
Member Avatar for blitz9

Hi, I tried to make a game trainer, static address can be done. But since the game change it's address every time the game restarted it's make me frustated. Do you have a solution for this?

Member Avatar for blitz9
0
84
Member Avatar for manishanibhwani

in one of the question for beginners a program for moving a file was asked. i cud not find the algo can anyone suggest me the algo????????????

Member Avatar for Ancient Dragon
0
197
Member Avatar for mrnutty

In this challenge there are 3 question, beginner, intermediate, and others. Beginner: [b] [ICODE]1) Find the sum of all Natural numbers that are a multiple of 3 or 11, from 1 to 100,000. [/ICODE][/b] Intermediate: [b] [ICODE]The prime factors of 13195 are 5, 7, 13 and 29. What is the …

Member Avatar for mrnutty
0
148
Member Avatar for niyasc

Hai..... May I know how to simply include external image file in Turobo C++? Where can I get a complete tutorial for graphics in C++?

Member Avatar for CppBuilder2006
-1
125
Member Avatar for Skeen

So I'm quite new to c++, and I'm really into pointers, does anyone got like, an idea on how to really get to know pointers, assignments, tasks, tutorials, ect. Basically, my knowledge in C++, is classes, operator overloading, and like simple stuff, so if you're able to come up with …

Member Avatar for manishanibhwani
0
93
Member Avatar for mythili_sharon
Member Avatar for manishanibhwani
0
140
Member Avatar for CppBuilder2006

I have region: [code] Region r[/code] and I have a point: [code]PointF p[/code] is there any method that determines whether p is in r? something like this [code] bool is_p_in_r = graphics.Determine(p,r); if(is_p_in_r) Execute("theMan.kil"); :) [/code]

Member Avatar for CppBuilder2006
0
149
Member Avatar for Behi Jon

Hi, What kind of project is required for running this program in Visual C++ : [code] #include "ChessGame.h" int __stdcall WinMain() { Application::Run( new ChessGame() ); return 0; } [/code] Thanks ............................

Member Avatar for Ancient Dragon
0
104
Member Avatar for johndoe444

hi what is the meaning of const in the declaration below: [CODE]const int*const Method3(const int*const&)const;[/CODE] Thanks

Member Avatar for Dave Sinkula
0
403
Member Avatar for Androggles

Hey :) I have written this code, but it seems that theres an error in it, that i can't find. When i try to compile it i get this error: Call to undefined function 'sleep' in function main(). I know it has something to do with that sleep function, because …

Member Avatar for Excizted
1
484
Member Avatar for gedas

Hey everyone, im trying to get to know vectors but i came to a point that my current knowledge stops and i need more help, i found a program which i would like to understand but i couldn't figure it out. here is the code: [code]#include<iostream> #include<vector> #include<string> #include<iterator> using …

Member Avatar for gedas
0
138
Member Avatar for bigsurya

Why do we overload operators ? Is it possible to add/subtract objects of a class without using overloaded '+' operator ?

Member Avatar for Narue
0
93
Member Avatar for monocog

Before I begin, let me start by saying that this is NOT homework. I am also not enrolled in a C++ class. I am simply trying to learn C++ as I have time. I am using random assigments/tutorials/whatever I can find on the net and shopping amazon for books. I'm …

Member Avatar for bigsurya
0
129
Member Avatar for Nhevik
Member Avatar for Androggles

Hello I am very, very new to this C++, and i have been working on something that could help us with something, but thats a long story... Anyways, i want the program to first delete a file then wait some time, and then delete another file. I got it to …

Member Avatar for Androggles
0
223
Member Avatar for rmawatson

Hello, I was hoping someone might be able to clear up some questions I have on casting Objects vs Casting Pointers in C++. The first example below is compilaining that the constructor of XDeviceMotionEvent cannot construct a new XDeviceMotionEvent object from an _XEvent&. What I dont understand about this is …

Member Avatar for Narue
0
245
Member Avatar for astropirate

Greetings all Is it possable to get the UDP packet header info from the function recv()? i specifically want the packet length data. If not with recv() is there any other way of doing this? (besides raw sockets)

0
38
Member Avatar for CppBuilder2006

what is the difference between memory allocated by [ICODE]GlobalAlloc[/ICODE] & memory allocated by [ICODE]new[/ICODE]. is GlobalAlloc used in C++ or is it for C? :)

Member Avatar for CppBuilder2006
0
278
Member Avatar for peterpanic

I am trying to take an integer argument (1-65536) and turn it into two hex characters. If argument -t is -t20 then I need 0x01 0x04 in a character array for sending through a socket. Relavent snippets: [CODE] char tstr[3]; char timetxt[6]; struct pulsepayload { char chan; char state; char …

Member Avatar for WaltP
0
299
Member Avatar for ge6a93

Hi, in my MFC dialog app i have a message, saying "Press any key to go on" I wanna make it in the way, that when the user presses any key it must do something(i have already done that). So, how can i check if any key is pressed using …

Member Avatar for Duoas
0
119
Member Avatar for mcuk2001

[URL="http://i50.tinypic.com/6homdv.jpg"]http://i50.tinypic.com/6homdv.jpg[/URL] heeeeeeeeeeeeeeeelppppppppppp plz

Member Avatar for mcuk2001
-1
97
Member Avatar for amatallah
Member Avatar for slim2hott

Hi everyone. Recently I have been working on an XOR encryptor/decryptor. I have looked at tutorials to get ideas. Now, I have created my encryptor/decryptor and I have absolutely messed it up i think, because the output is not right. What I am trying to do here is: [LIST] [*]Creating …

Member Avatar for slim2hott
0
186
Member Avatar for johndoe444

Hi, [CODE]class base { int i, j; public: void set(int a, int b) { i=a; j=b; } void show() { cout << i << " " << j << "\n"; } }; class derived : public base { int k; public: derived(int x) { k=x; } void showk() { cout …

Member Avatar for Bench
0
117
Member Avatar for harryhaaren

Hey all, Slight continuation on[URL="http://www.daniweb.com/forums/post1092017.html"] this thread.. [/URL] Not essential though. Hence the new thread. The problem is that when I declare a [icode]static[/icode] attribute of a class, and later try using it in a static member function , I get a compile time error. The problem: (with code) OscServer.hpp …

Member Avatar for harryhaaren
0
165
Member Avatar for PDB1982

I'm trying to study for my A+ exam, and in doing so I am having trouble finding a free computer program that asks relevant questions. With that being said, I'm looking to build my own which will help myself, and possbily future generations. My problem is, that I don't know …

Member Avatar for iamthwee
0
84
Member Avatar for stoudemire132

these are my homeworks please help me... S8. create a class with the name complex. For that class, the requirements are; -define variables as relevant as possible for the above class ( re and im of type double ) ; -the class constructor ; -function display ; -functions to return …

Member Avatar for iamthwee
-3
112
Member Avatar for jbarwick

consider the following (illustrative .. no NULL checking): [CODE]class MS { public: TCHAR _buff[1024]; MS() { ZeroMemory(_buff,sizeof(_buff)); } ~MS() { } LPCTSTR operator LPCTSTR() { return _buff; } void operator = (LPCTSTR s) { _tcscpy(_buff,s); } BOOL operator == (LPCTSTR b) { return _tcscmp(_buff,b)==0; } BOOL operator == (MS &m) …

Member Avatar for Narue
0
280
Member Avatar for arpit.mishra

Hi, I have a question regarding assignment operator. Can I use an overloaded assignment operator for copying character pointers. Thanks in advance.

Member Avatar for arpit.mishra
0
158
Member Avatar for vespasianvs

Hi, everyone. I am studying Qt4. I want to write a function that reads from a file and the write to the same file. It is supposed to be simple, but I can't make it through the compiler. Here is my header file: [CODE] #include <QFile> #include <QString> #include <QStringList> …

Member Avatar for vespasianvs
0
735
Member Avatar for anushri

hello!!!everyone..... i want to print all characters from zero to 255 in a file. i am confuse how to distinguise character and integer in c++..(dont make use of printf) i unable to point a pointer to file or can say point a pointer to character and increase it to next …

Member Avatar for mrnutty
0
64
Member Avatar for bernadlosini

hi, i need to use both java and c++ for my project.but i don't know how to set path for both.i use jdk 1.5.6 for java compiler and mingw compiler for C++ .but i am able to use one compiler at a time. is there any option to use both …

Member Avatar for bernadlosini
0
219
Member Avatar for johndoe444

Hi, [CODE] #include <iostream> #include <cstdlib> #include <new> using namespace std; class loc { int longitude, latitude; public: loc() {} loc(int lg, int lt) { longitude = lg; latitude = lt; } void show() { cout << longitude << " "; cout << latitude << "\n"; } }; // Global …

Member Avatar for r.stiltskin
1
166
Member Avatar for damaged

Hi, i'm second year in college and i'm diving into the basics of c++ , basicly i have to read 2 numbers and divide them with each other by repeated substractions using a function, the function is to divide those numbers by repeatedly substracting one from another, and return the …

Member Avatar for damaged
0
138
Member Avatar for ayan2587

hi frnz.. have a bit of trouble here...:( i am allocating a dynamic integer array... after allocation i assign different values to every array element. now what i wish to do is to delete the array and free the memory element by element & not as a whole array at …

Member Avatar for Salem
0
181
Member Avatar for ayesha91

Hey everyone,,, tomorrow is my c++ final,,, and am having a problem with a simple code,,, it seems logical but i do not know why it is not working,,, I wrote two function one that get the length of the string and another to reverse the character in the string,,,, …

Member Avatar for Lerner
0
159
Member Avatar for SasseMan

Hi! I am having some problems with using the operator= on an dereferences object. I have the code... [CODE]Julian j1(2319,1,7); Date * dp = new Gregorian(2319,1,23); cout << (*dp) << " " << typeid(*dp).name() << endl; *dp = j1; cout << (*dp) << " " << typeid(*dp).name() << endl; j1 …

Member Avatar for SasseMan
0
102
Member Avatar for anakondaksa

I want to develop this program through the arrays to work on more than how Server؟ [CODE] /////////////////////////////////////////////////// /// Program For Simulation 2 server in 2 line //// /// Create By :Anakonda-ksa //// //////////////////////////////////////////////// #include<iostream.h> #include<stdlib.h> #include<cstring.h> int main() { int na=0 ,nb=0; float time=0,total_time,no_of_completion_a=0,no_of_completionb=0, total_area_a=0,event_time_a,total_busy_time_a=0,total_area_b=0,event_time_b,total_busy_time_b=0, Ra,Rb,Xa,Xb,Ua,Ub,Na,Nb,prev_event_time_a,prev_event_time_b; string event_type; { …

Member Avatar for jonsca
0
92
Member Avatar for safenaa

i want to know how make dequeue in queue . please, the answer with a complete program. thanks,,,,,,,,,,,,,,,,,,,

Member Avatar for jonsca
0
40
Member Avatar for Ugaton

guys got some problems with regards to c# programming im new with this one.. my problem is displaying 5 integers or numbers that is having a 3 spaces in between the numbers.. want some of your codes.. thanks a lot guys... Happy new year

Member Avatar for ddanbe
0
106
Member Avatar for BazookaJo

Hi guys, first of all let me say that I'm a Delphi guys, but I've been cleaning up some old legacy C++ code without any real issues. The following piece of code however baffles me! It looks like it simply copies the binary input file to another file bit by …

Member Avatar for BazookaJo
0
160
Member Avatar for Silvershaft

I've written a DLL with keyboard hook inside, how do I load the dll in my code and like activate it, the hook function inside dll writes keyboard presses to a file, I would like to activate it from my exe.

Member Avatar for Silvershaft
0
146
Member Avatar for new programer

Hi, How can I create a program that detectes plagarism lets say we have two files and we want to compare them and at last to have the percentage of smilarity I am aware of strcmp and compare and I know how to use them it's just the methodology that …

Member Avatar for Salem
0
114
Member Avatar for fadia

Heey guys... I'm in a rush.. I don't know how to write on definition of a function here. Please help. The function interval_since is supposed to compute the time. The previous time and the current. I'm confused how to write the definition. Here is my code.. and the very last …

Member Avatar for Salem
-3
111
Member Avatar for _Michael_

Hello, I am making a console application for a window home computer. The application will search for factors of a number that the user enters. Everything works fine up to about [10^10 = 10000000000]. I am unsure if C++ has a maxium number allowence. If this is the case can …

Member Avatar for WaltP
0
129
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
86

The End.