49,761 Topics

Member Avatar for
Member Avatar for rajeshgoblet

hello i am working on a c,c++,java tutorial website, & i want to insert lots of source code example in it. I am doing this using <span> & CSS classes. I have seen some online code highlighter. i want to make one for my site. And is there any other …

Member Avatar for Dani
0
113
Member Avatar for Sprewell184

Hey,hoping someone can help me. I'm having an error in my project. This is the problem for the project: In C++, the largest int value is 2, 147, 483, 647. So, an integer larger than this cannot be stored and processed as an integer. Similarly, if the sum or product …

Member Avatar for Sprewell184
0
578
Member Avatar for myk45

Hello All! Well this is not exactly a C++ question. Please let me know if this needs to be posted elsewhere. So, here it goes: I have a project, cosisting of the entire buildrules in Makefiles. This has been built only on Linux. Now, i need to build it on …

Member Avatar for myk45
0
214
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
205
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
353
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
260
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
134
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
251
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
113
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
235
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
466
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
132
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
134
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
115
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 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
439
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
290
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
128
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
153
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
607
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
146
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
183
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
267

The End.