51,593 Topics

Member Avatar for
Member Avatar for Suzie999

I have been trying in vain to pass an array to a thread and have that thread loop through it. Here is code of a simple thread passing an int to it. #include "stdafx.h" #include <windows.h> #include <stdio.h> #include <stdlib.h> #include <iostream> DWORD ThreadProc (LPVOID lpdwThreadParam ); int threadnumber = …

Member Avatar for Suzie999
0
213
Member Avatar for Sendy Hipo

hi guys, im curious about c++ gui qt , the i searched for it and download QT opensource 4.8.2 (300mb+) for windows i run the installer, then it asked me for MinGw's directory in my pc, then i use the MinGw inside my codeblock, after that it said "Found version …

Member Avatar for Sendy Hipo
0
358
Member Avatar for np complete

Can some one list all the functions in windows.h and there uses? Can't find it in Msdn.

Member Avatar for np complete
0
269
Member Avatar for Nikhar

I am writing a c++ code (or any sort of code for that matter) after one complete year. And yet I don't think I could have become so bad that I can't make a Hello World program. Still, here I am with so many errors. Here's the code:- [CODE]#include <iostream> …

Member Avatar for pc75
0
3K
Member Avatar for triumphost

I'm trying to generate Unique ID's for a buffer unless they contain the same content. Inother words if the buffer has the same content as another, the ID should be the same; otherwise different. I've found someone using this algorithm for the same kind of buffer: DWORD CalcChecksum(DWORD *pData, int …

Member Avatar for triumphost
0
137
Member Avatar for VernonDozier

I'm trying to createa function that takes command line arguments, parses them, and returns a stream to be used for output. If a filename is specified, the program will write to that file. If no filename is specified, the default output will be to cout. I haven't gotten to the …

Member Avatar for VernonDozier
0
8K
Member Avatar for learner_new

> this is my udp server code #include<iostream> #include<arpa/inet.h> #include<unistd.h> #include<sys/socket.h> #include<sys/types.h> #include<stdio.h> #include<string.h> #include<stdlib.h> using namespace std; void error( char *msg) { perror(msg); exit(EXIT_FAILURE); } int main() { int sockfd; sockfd = socket(AF_INET,SOCK_DGRAM,0); struct sockaddr_in serv,client; serv.sin_family = AF_INET; serv.sin_port = htons(53000); serv.sin_addr.s_addr = INADDR_ANY; char buffer[256]; socklen_t l …

Member Avatar for BobS0327
0
3K
Member Avatar for Labdabeta

Whenever I tell anybody under the age of 20 that I am a programmer, they always ask the same question sooner or later: "Can you hack my computer." I tell them that even if I could I wouldn't. They follow up by telling me to just make a pop-up or …

Member Avatar for VernonDozier
0
253
Member Avatar for mindhacker

When we try to take input from user using cin.getline() function then there is necessary to call cin.ignore function before that line to successfully done that work. Otherwise the program takes the garbage values for the next iteration.

Member Avatar for deceptikon
0
115
Member Avatar for userIT

I have this code that supposed to display the values from an array to a text file #include <iostream> #include <cstdlib> #include <fstream> #include <vector> using namespace std; int array[7][4]; fstream file2; template< typename T > void display( const vector< vector<T> >& matrix ) { for(int i = 0; i …

Member Avatar for userIT
0
239
Member Avatar for Lostelf

Hello I'm trying read data from a file and display it into 3 arrays coloums. however I keep on getting an error on line 33 stating [expected primary-expression before "int,double,int,int"] [ISO C++ forbids declaration of `readHousehold' with no type] I cant figure it out but I know it has to …

Member Avatar for Lostelf
0
469
Member Avatar for Suzie999

I'm trying to split an array which is that of unsigned char where NULL marks the split point I have written this code, but it just looks clunky, and I would like to ask advice on any other more efficient methods of doing such a thing there might be. #include …

Member Avatar for Suzie999
0
1K
Member Avatar for venkat.bv

Hello, I have a pstack like below: fb741158 abort (ffbfde08, 0, fdb7403c, ad260, 1c00, d750) + d0 fdb60b00 free (e8000, f57b8, 0, 20, d, 20000000) + 20c fc44d268 __SLIP.DELETER__A (fef98, 1, fb7f3700, 148050, 1, fef98) + 38 0008a678 __XXXXXXXXXXXXXXXXXXXXXXXXXx_ (deda8, ffbfe4b0, c6e65, df6a0, da9dc, f0000001) + 1c38 Can you please …

0
52
Member Avatar for Aghtar

Hello, first time here in the forum, though Ive used it before for help. Okay so I have to create a constant to define the size of two float arrays and Create two one dimensional float arrays in the function main() called highs and lows. const int MAX = 7 …

Member Avatar for NathanOliver
0
134
Member Avatar for prglili5994

Please help me Create a program to enter and average the high and low temperatures for the week. ï‚· Create a constant to define the size of two float arrays. ï‚· Create two one dimensional float arrays in the function main() called highs and lows. const int MAX = 7 …

Member Avatar for Lucaci Andrew
0
69
Member Avatar for triumphost

I hooked a game's OpenGL.dll with my own glwrapper but this game uses two dll's.. It uses a wrapper of OpenGL32 and my hook is also a wrapper. So what I need: I want to know if these symbols point to the same functions.. http://i.imgur.com/eMZC5.png @28, @28, @28.. That means …

Member Avatar for gusano79
0
137
Member Avatar for Tinnin

Hi Daniweb community. This is my first post. I'm new to this programming lark and I've hit a snag with an exercise I'm attempting. EXERCISE Write a program that asks the user to type an integer N and compute u(N) defined with : u(0)=3 u(n+1)=3*u(n)+4 My Attempt: // Iteration #include …

Member Avatar for Tinnin
0
117
Member Avatar for Ararat

I'm trying to compare the element pointed by an iterator to an integer, but so far i haven't had any luck in doing so. please correct whatever i'm doing wrong. Thank you. vector<int>::iterator y; for (int i = 0;i<n2;i++) { cin>>temp; cnt = 0; y = lower_bound(a.begin(),a.end(),temp); if (*y == …

Member Avatar for Ararat
0
1K
Member Avatar for yousafc#
Member Avatar for ChrisHunter
0
222
Member Avatar for srinivaskolli

> Hi everyone, I have to implement a circular queue using linked list here. > We imagine a queue in a circular shape where we break at a point such that now it has 2 ends > Now we have to perform insertion and deletion at both ends one at …

Member Avatar for srinivaskolli
0
2K
Member Avatar for james.price.39501

#pragma once #include <fstream> namespace testrun1 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; using namespace System::IO; using namespace std; #pragma endregion private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) { ifstream inputFile; ofstream outputFile; inputFile.open("1.txt"); outputFile.open("sum.txt"); int num1; int num2; …

Member Avatar for Ancient Dragon
0
442
Member Avatar for Suzie999

Hi I'm wondering if there is a simple win32 API to retrieve the current module filename (xxxx.exe) I know about GetModuleFilename which gets the full path. And I have read that argv[0] holds the exe name, but that also give me the full path. What I'm after is an API …

Member Avatar for Suzie999
0
313
Member Avatar for XodoX

for i := 1 to n do for j := 1 to n do C[i, j] := A[i,j] + B[i, j] #include <iostream> #include <iomanip> using namespace std; int SIZE = 10; double Sum(double matrixA[SIZE], double matrixB[SIZE]) { int i = 0; int j = 0; double rows, columns; double …

Member Avatar for XodoX
0
130
Member Avatar for napstercc

I'm learning c++ at school, ( 2nd class , we're at polymorphism now) and I would like to now how to create a program that will be visual. Let me explain: I am creating an automated garden project. I want it to control a fan, a water valve, humidity and …

Member Avatar for Ancient Dragon
0
155
Member Avatar for james.price.39501

//:How do I convert to string? C++? pragma once #include <iostream> #include <fstream> #include <istream> #include <string> namespace testrun1 { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; using namespace System::IO; using namespace std; private: int total; #pragma endregion private: …

Member Avatar for Ancient Dragon
0
621
Member Avatar for Geeksoftie

Quad Tree is a tree with four pointers like North East, North West, South East and South West. Its used a lot in region query. Is there a way where I can find the min and max nodes a quad tree using some trick or is there some standard formula …

Member Avatar for L7Sqr
0
148
Member Avatar for gizmo7008

I'm doing a program, and trying to find the @, going back to the beginning to search for valid characters, and when I find an invalid one I move it forward to valid one. Same goes for the end, except just leaving it at the invalid character. My program compiles, …

Member Avatar for gizmo7008
0
186
Member Avatar for Datamaster12

I'm really not into obj-c, it's not a very intuitive language, and c++ is what I know and it's much cleaner. However, I do want to get started in making iphone apps. Is there anyway I can do this in c++?

Member Avatar for codecruncher
0
273
Member Avatar for Ian Woodgate

Hi all I've been asked to write a C++ program that the user enters a five digit integer. The program then needs to return how many zeros in the number, how many odd numbers and how many even numbers. I've set it up to %2=0 and %2!=0 to determine if …

Member Avatar for profyou
0
136
Member Avatar for rdrahul809

I am new to c++ language, and i am stucked with this que. my teacher told me to write a prog. that will calculate (1)square-(3)square+(5)square-(7)square+(9)square.............so on using for loop can you help me.

Member Avatar for Schol-R-LEA
0
107
Member Avatar for newbie1234

I want to implement public key cryptography in my poject. How to implement using c langugae. Is there any library or api. Thanks for help

Member Avatar for deceptikon
0
83
Member Avatar for damaritah

hello.... 1. how does one link a 2 radiobuttons in c# 2010 to the same column in ms sql 2005 2. what could be the problem when one tries to enter data from texboxes in c# 2010 to ms sql 2005 but its not reflecting? 3. what is the syntax …

Member Avatar for ChrisHunter
0
156
Member Avatar for daino

Anyone used both Podofo to parse pdf's. How does this compare to just using Adobe SDK. I will look into this myself though it will take a while to make a comparrison. Was wondering if Pofofo adds any additonal functionality to the Adobe SDK library or should I just incorporate …

0
158
Member Avatar for daino

Could anyone recommend some reading material to help be better understand the ADOBE SDK C++ API. I'll need it for parsing pdf's and other things. Is there a book written on this or are we restricted to what is on the adobe developers website? Thanks danny2000

Member Avatar for daino
0
305
Member Avatar for lakshman3
Member Avatar for Amiet Mhaske

Hey guys hello, I am new to programming language. I have some suggestions about **Ditto Clipboard manager**. For that i would like to edit some part of ditto clipboard manager. Can you guys please help me **how can I edit it's source code**. It's available free at here, please [Click …

Member Avatar for ertthewer
0
356
Member Avatar for phorce

Hello, I'm trying to develop an algorithm/program that calculates the distance between two points. These values are stored inside a 1D array, which, acts as a 2D array (I think you know what I mean!) The values are: 150 50 15 20 The calculation should therefore be: d = √(150 …

Member Avatar for phorce
0
209
Member Avatar for MasterHacker110

I have the following code: #include <iostream> #include <fstream> #include <string> #include <ctime> #include <windows.h> #include <cstdlib> enum ERR_CODE {SUCCESS, ERROR}; But as soon as I compile it it gives this error: C:\Users\User\Desktop\Program.cpp|8|error: expected identifier before numeric constant C:\Users\User\Desktop\Program.cpp|8|error: expected '}' before numeric constant C:\Users\User\Desktop\Program.cpp|8|error: expected unqualified-id before numeric constant …

Member Avatar for MasterHacker110
0
6K
Member Avatar for Mereo

I'm currently reading the book "C++ primer plus 6th edition" and it says the char pointer needs to be a constant. I don't really understand the explanation so I did some tests. I don't understand why when I use cin to an already used char pointer, it crashes. But when …

Member Avatar for Mereo
0
163
Member Avatar for dlmagers

This is the code that I have and for some reason it is not given me that I need. #include <iostream> #include <iomanip> using namespace std; int main () { // variables double salary = 0.0; int RATE = .03; // enter salary cout << "Salary (-1 to stop): "; …

Member Avatar for dlmagers
0
197
Member Avatar for techy23

Hi! Guys. I want to make a game in C++. I don't know anything about game programming at the moment, but will make it one day. :) could you suggest me , great game ideas in C++. game that is presentable and interesting. Please give your best ideas and suggest …

Member Avatar for DeanMSands3
0
241
Member Avatar for 9tontruck

Hi guys This is a question about C++ setting you dont even need to know about the library I am trying to use. I am coding C++ in VS2010 right now and I am trying to use 'icclib' which was downloaded from http://www.argyllcms.com/icclibsrc.html I made a new project, added an …

Member Avatar for gusano79
0
227
Member Avatar for astala27

Hi mates, How can I keep the result ready to paste in copy? I was trying to find this thing on Google but so far everthing is about to copy the physical address of the data :/ I need to copy the result, as an example imagine a calculator copy …

Member Avatar for NathanOliver
0
351
Member Avatar for timk25

Hi, I am new to programming and I am struggling with an sql select statement. I would really appreciate any help anyone can offer me! What I am trying to do is populate a textbox (using code and without creating a dataset) with data retrieved from an sql database. I …

Member Avatar for idrissi
0
189
Member Avatar for osiron

Hi guys, I'm kinda new to pthreading and so I made this program that prints "hello" 10 times but I wanted to have a delay where it puts "hello" in one second between time interval (like a stopwatch). Unfortunately, I used the `sleep(1)` function and it only prints out one …

Member Avatar for L7Sqr
0
146
Member Avatar for sam1

hi, I want to pass textbox text from one form to another using Property get and set. I have done it successfully on click event and then when popup window opens (or form2 opens) i get the value after initialization... But i want to learn how to do it with …

Member Avatar for roemerito
1
2K
Member Avatar for dot_binary

I'm tring to make 3D rotation of a poligon, I wrote my own functions for that.The problem is when I rotate some points in 2D it works but if I use the same functions for 3D , while rotating the veteces move to the center of the object and remain …

Member Avatar for DeanMSands3
0
159
Member Avatar for apanimesh061

I need to run Mingw4.6 on my Dev C++ which already has mingw32 3.6 installed! Does this version of mingw allow us to use 'C++11' ??? Please help!

Member Avatar for triumphost
0
2K
Member Avatar for lil_bit

Hi. Here is a simple beginners program. It uses "if_else" and returns no information. After execution, it deletes files within the same directory as the exe. Enjoy.

Member Avatar for mrnutty
0
211
Member Avatar for Hazardous_Byte

Hello everyone! I am having a bit of an odd problem here. So, on my Visual Studio project, I decided to use a precompiled header. This didn't seem to cause a noticable problem up until today. I have a small segment of code that is supposed to remove one element …

Member Avatar for Hazardous_Byte
0
735

The End.