19,876 Topics

Member Avatar for
Member Avatar for Acquire

Hi guys, I'm making a program tha thas to open a file, and then store the information from the file into a structure variable, only I can't get the function to work. I can get the program to work if I put the reading of the file in the main …

Member Avatar for Lerner
0
106
Member Avatar for com spec

i am not sure where to post this treat but i know that Visual Stuido Team System can do software development therefore i place it under software development category. ok. my question is i want to know about can i create A Check-in policy in Team System? cause i believe …

0
75
Member Avatar for Sin-da-cat

OK, so the part of my course about files is over, but now I am wondering: if you have a file with, say, a bunch of names (each in its own line), is it possible to use "C" to make a new file with the names aranged alphabetically? For example, …

Member Avatar for vegaseat
0
388
Member Avatar for nanodano

Does anyone know where I can find the pthread library for Linux? And I don't want any rude "go google it" responds. I tried that, and all I came up with was one download available for win32.

Member Avatar for nanodano
0
81
Member Avatar for harish13

[I]hi,[/I] [I] have a exe file (developed in C) I want to call this exe from VB at the same time i want to pass a file name as parameter to that exe file .Please help me in this regard thank u in advance[/I]

Member Avatar for Marikanna
0
80
Member Avatar for Gunner54

Code [code] //God Mode }else if(stricmp(lpcLine, "!god") == 0){ bRet = false; if(ADDR_GODMODE[0] != 0x90){ BYTE godmode[] = {0x90, 0x90}; EnableHack((BYTE*)ADDR_GODMODE, godmode, 2); Echo("GodMode On"); } else{ BYTE godmode[] = {0x7B, 0x05}; EnableHack((BYTE*)ADDR_GODMODE, godmode, 2); Echo("GodMode Off"); } [/code] Error error C2109: subscript requires array or pointer type

Member Avatar for Lerner
0
95
Member Avatar for sameer.mastek

I am working on eSNACC 1.7 and VC++. I want to convert the ASN.1 to noraml c++ data type and vice versa. Right now I have generated code and created the dll for the C++ files generated from ASN.1 module. But the issue is with using this dll to encode …

0
67
Member Avatar for Firestone

I cant get my function code to work. Its should return an average of however many numbers are entered, but it always returns 775863 no matte what... can anyone tell me whats wrong? [code] #include <stdio.h> int avg(int av[], int y, int x, int z); int main(){ int x=0; int …

Member Avatar for Ancient Dragon
0
109
Member Avatar for rxgmoral

about VC+MySQL problem:) i install mysql odbc V5.0 driver i need to ADO Connect MYSQL DB; code: _ConnectionPtr m_CMConnect; ::CoInitialize(NULL); m_CMConnect.CreateInstance(__uuidof(Connection)); m_CMConnect->Open("Provider=MySQL;server=localhost;DataBase=test;port=3306;uid=root;pwd=","","",-1); but Program run error..... how to Ado Connect MYSQL DB; thank:)

0
56
Member Avatar for rQQt

Hello I'm writing a little selection sort program in C. Unfortunately the algorithm doesn't work correctly. After the selection sort some float numbers in the array are rounded down to whole ints. Here's the example: [inlinecode] Code: enter input filename:data // input numbers 5.000000 7.000000 -48.400000 8.800000 8.400000 1.500000 8.400000 …

Member Avatar for Salem
0
96
Member Avatar for Acquire

Ok, I'm doing a basic structure program that displays things. Here's an example of what it should display. [code]Invalid data in line 11 Daring Dunkers Player Statistics Player Field Goals Free Throws Total Tried Made % Tried Made % Points Jerry 2 1 0.50 2 1 0.50 3 Akeem 0 …

Member Avatar for WaltP
0
108
Member Avatar for JRM

I have a funtion executing a loop, which semes to be progressing normally until the debugger halted with this message; Program received signal SIGSEGV, Segmentation fault. I pulled up a a backtrace and it had "normal lookuing" addresses for the this pointer and the reference variable. I could probably figure …

Member Avatar for Ancient Dragon
0
75
Member Avatar for Acquire

I'm trying to make a loop that that will skip a number but has a certain limit to how high it goes... For example: I have a for loop: [code]for (i = 0; i < count; i++ ) { stuff }[/code] but lets say I want to skip a number …

Member Avatar for Acquire
0
494
Member Avatar for stupidenator

Hi everyone, I have a small problem. I am writing a program for school in which I will construct a hash table for dictionary words, using the soundex code of the word as the hash function. For the hash function, I have to take the soundex code and convert it …

Member Avatar for stupidenator
0
141
Member Avatar for Acquire

I'm fairly new to C and have been doing pretty good up until arrays. I understand the basics of them but not exactly how to use and impliment them in more complicated ways. I am trying to write a program that will display a table of strings and intigers from …

Member Avatar for majicbeans
0
241
Member Avatar for majicbeans

[CODE=c] #include<stdio.h> int main(void) { char letter; char *pletter; pletter = &letter; printf("%p", &letter; putchar('\t'); printf("%p", letter); putchar('\n'); puts("Understand?\nWhat is the right way? it is 4bytes different"); //*allows the value to be altered by the base adderess //&lets a datatype to value by its adderess from another datatype takes 2 …

Member Avatar for majicbeans
0
130
Member Avatar for swathi.s

hey ppl, for a project in coll i need to implement a simple lexical analyser in C....i did get a code but wen implemented it recognises EOF after one blank line...as d input n ouput are files...so if any idea as wat could be d reason??? n any codes to …

Member Avatar for iamthwee
0
131
Member Avatar for boujibabe

I working on a program that summerizes text documents and I need a way to find the length of the longest and shortest lines in the file and display it in a log file. I've already done a character count and line count. Also say I wanted to created different …

Member Avatar for boujibabe
0
333
Member Avatar for varsha5in

[B]hello guys, I have to implement multilevel paging in c. It has to read a text file which has 32 bit addresses. It has to divide it into level 0,1,2. Decide number of bits for all these levels. Then implement it in the way multilevel pagetables are implemented. This one …

Member Avatar for ~s.o.s~
0
28
Member Avatar for Gunner54

When i compile this code i get a few errors (i guess are simple for you guys) [CODE]void WriteMem(DWORD MemOffset, DWORD DataPtr, DWORD dataLen) { { DWORD OldProt; VirtualProtect((void*) MemOffset, dataLen, PAGE_EXECUTE_READWRITE, &OldProt); RtlMoveMemory((void*) MemOffset, (const void*) DataPtr, dataLen); VirtualProtect((void*) MemOffset, dataLen, OldProt, &OldProt); } void EnableHack(BYTE* AddrToChange, BYTE* To, …

Member Avatar for WaltP
0
170
Member Avatar for aznballerlee

[code] #define _CRT_SECURE_NO_DEPRECATE #include <iostream> #include <fstream> #include <cstring> #include <cctype> #include <cstdlib> #include <ctime> using namespace std; const int MAXWORDS = 8000; const int MAXWORDLENGTH = 6; const int MINWORDLENGTH = 4; int nWords; void fillWords(char words[][MAXWORDLENGTH + 1], int maxwords, int& num); int playOneRound (int wordnum); void correct …

Member Avatar for ~s.o.s~
0
119
Member Avatar for Eddy Dean

Hello, I want to be able to read the memory of a process in Linux. After some googling I've read that ptrace can be used to this. The syntax of ptrace is as follows: [code]int ptrace(int request, pid_t pid, int addr, int data);[/code] The first value (int request) is what …

Member Avatar for ~s.o.s~
0
250
Member Avatar for hkBattousai

Hello, I want to create a WebBrowser control in my Win32 project using DevCPP. I had a search in MSDN. Creating a WebBrowser control looks like far different than creating a button or edit control. I have no idea what code should I write. Any answer will be apreciated.

Member Avatar for Ancient Dragon
0
71
Member Avatar for nasduck

Hello, there: I am trying to calculate to the inverse of matrix A. How to call function to main part? How to write the code for a matrix? Can someone help me modify the errors? Thank you very much! -------- [code=c] #include "matrix.h" Matrix solve(const Matrix& A, const Matrix& B){ …

Member Avatar for iamthwee
0
97
Member Avatar for spacecowboy123

Hi All, I'm having a problem with a friend function I am using. The darn thing just won't compile! It goes something like this [code] class G { protected: public: void reduce(H& Cost); }; void G::reduce(H& Cost) { Cost = Cost * 0.95; } [/code] and later [code] Class H …

Member Avatar for Ancient Dragon
0
123
Member Avatar for kie

Hey all Basically, I am trying to get my head around data validation. I am very new to C, in fact I have only been doing it a few days. I am trying to make a simple currency converter that validates that the data is numerical. Alos, I would like …

Member Avatar for WaltP
0
258
Member Avatar for TylerSBreton

This block of code will compile, but gives me a runtime error: before the first comment is a header that is included in the file that you may need to analyze my code. [code= c] typedef char *string; typedef struct { string fieldName; string value; }oneField; /* this starts the …

Member Avatar for TylerSBreton
0
5K
Member Avatar for atrusmre

Say I have an edit box in a MFC application (let's call it IDC_EDITBOX), and I enable (because I have it greyed out by default)it using [code=c]GetDlgItem(IDC_EDITBOX)->EnableWindow(TRUE)[/code] How do I set the focus to that control? In other words, when I enable the control, how can I get the cursor …

Member Avatar for atrusmre
0
136
Member Avatar for Sin-da-cat

I'm pretty much new to using files, so I'm not sure if this is a banale question. Here's the assignment: "[I]Each line of the file dec.txt contains a whole number (>0). Write a program that creates a file called hex.txt. Each line of this file is to contain a string …

Member Avatar for Sin-da-cat
0
215
Member Avatar for batista06

Hey, while doing an assignment I came across a code. however, when I run it I get no output. would like to know why if anyone knows..... [code] #include <stdlib.h> #include <stdio.h> int main(int ac, char** av) { unsigned register int j,sum,dcnt, limit; unsigned int number,max; if (ac != 2) …

Member Avatar for batista06
0
105
Member Avatar for Prahaai

Hello. I have this problem: I have a let's say [1000] char string and i want to split and print this on the screen on more lines, so that each and every line has MAXIM 43 characters. The string may contain spaces and the words would be printed on the …

Member Avatar for Prahaai
0
91
Member Avatar for s88

the problem is that, the function is only replacing the number that I want to delete with th number after it, but everything remains the same after. e.g. it is showing me 1 2 3 5 5 6 7 8 9 10 [code] #include <stdio.h> int rem(int a[],int pLen,int pos) …

Member Avatar for nicentral
0
88
Member Avatar for dev.cplusplus

Hi, I have two questions: 1. I receive a project and I noticed that when I want to compile I have the following options: Debug Release Release MinDependecy Release MinSize I know only Debug and Release, what are the other options? What are the meaning when compiling with this options? …

Member Avatar for Ancient Dragon
0
100
Member Avatar for siddhiinfomedia

Hello Friends... I've written a code for Simulating Paging algorithm using LRU... The code is in the attached file. Now on windows... it is executing perfectly, giving the output i desire... but on Linux REGAL gnu compiler, it is giving me the error... Error file is attached... as error2.jpg SEGMENTATION …

Member Avatar for Ancient Dragon
0
115
Member Avatar for aznballerlee

I'm having a hard time generating a "secret word" that is random. I'm taking a random word from the wordList array, and using it in the playOneRound function. Here is part of my instructions: [code] Using wordList[wordnum] as the secret word, this function plays one round of the game. It …

Member Avatar for aznballerlee
0
166
Member Avatar for webspy

I'm working on a plugin system for my application. The plugins are in the form of a dll loaded by my application using [inlinecode]LoadLibraryEx[/inlinecode]. I store information about each plugin in an arrray of structs: [code] typedef struct _InternalPluginInfo { UINT ID; HMODULE Module; int Flags; PluginInfo Info; } InternalPluginInfo; …

Member Avatar for webspy
0
156
Member Avatar for arbid123

I am calling C function from MATLAB using mex-files. The C function has a few static variables. I want to remove the static variables from the memory between consecitive calls to the C function. It is possible to do that without manually making all the variables in the C function …

Member Avatar for b4codes
0
78
Member Avatar for atrusmre

I am writing a MFC application and need to have the program pause for a few seconds. I am trying to use the OnTimer event and am having troubles. The following code causes the program to freeze and stop responding [code=c] m_iCount = 0; SetTimer(ID_TEST_TIMER, 1000, NULL); while(m_iCount <= 5) …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for GreenDay2001

here's a piece of window procedure. What does DefWindowProc do in this program. [code] LRESULT CALLBACK WndProcedure(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) { switch(Msg) { case WM_DESTROY: // user wants to exit PostQuitMessage(WM_QUIT); break; default: // Hand off unprocessed messages to DefWindowProc return [B]DefWindowProc(hWnd, Msg, wParam, lParam)[/B]; } …

Member Avatar for Ancient Dragon
0
109
Member Avatar for dev.cplusplus

Hi I to all I have the following question, I hope you can help me: I need to store variables, in diferent variable types, but I want to know for example the size of the int type what size of number I can store, I found that int can store …

Member Avatar for jbennet
0
88
Member Avatar for chunkmartinez

Whats an easy way could i display an image in a win32 program? (bitmap,gif,whatever)

Member Avatar for chunkmartinez
0
85
Member Avatar for kumarangopi

Guyz Iam happy to say that i moved little.Iam able to run the exe file without header files.It just needed egavga.bgi graphic drive.So i have to copy my exe file and egavga.bgi to other system to make the exe work.My point is i want my program to create egavga.bgi dynamically …

Member Avatar for WaltP
0
291
Member Avatar for Chaky

I think ppl should read this post. Short story: I was installing and reinstalling windows, troubleshooting some hardware incompatibility issues that I'm experiencing. I wanted to preserve my AV software as it is now, so I wouldn't have to download upgrades (~10 MB) via modem again. I've opened registry editor …

0
285
Member Avatar for aismm

Basically the user enters one of the following + - * / % | < > c q followed by one or more spaces, followed by an integer, and then the newline key to get the answer and the current vaule is set to 0 then it keeps on adding …

Member Avatar for WaltP
0
146
Member Avatar for JRM

I have been using Codeblocks, but I think I need to better understand what the "project" concept is all about. My original assumption was that it was a group of source, header and object files that pertained to a particular project. I'm discovering, however, that the IDE doesn't like more …

Member Avatar for manutd
0
183
Member Avatar for paradoxxx

Hey all, I have an array of uppercase letters, mixed with other non-alphaitalic charcters. I need to keep a frequency of the each of the uppercase letters, and how many other characters entered. JONN:sad:

Member Avatar for John A
0
236
Member Avatar for JRM

hello all, I moved a source file from a cgywin file to codeblocks. The file compiled and ran just fine in the cgywin environment. However, the same file under codeblocks complains about an undefined reference to winmain. error: [code] Project : Console application Compiler : GNU GCC Compiler (called directly) …

Member Avatar for Salem
0
76
Member Avatar for l2u

Hello Im working on a huge server on windows and im not sure what approach for multiclients should I use.. I know multithreading is not good, so I've been using non-blocking sockets until now (1 thread), which has limitation but this can be easily changed.. I wondered what do you …

Member Avatar for WolfPack
0
76
Member Avatar for dev.cplusplus

Hi, to all, I'm having the following problem: I'm trying to convert a CString to long(or number), but the number that is in the Cstring is too big and I loose data of the number. I was thinking in using instead of long use the variable ULONGLONG, but the problem …

Member Avatar for dev.cplusplus
0
119
Member Avatar for chunkmartinez

I just got into creating viruses(not for mallicious puposes).Does anyone know of cool techniques and stuff i could implement and how?

Member Avatar for Ancient Dragon
-1
70

The End.