18,490 Topics

Member Avatar for
Member Avatar for clam

Hi all, I have had some experience using pointers in C and C++, but not in VB6. I am using a function that requires as an argument (ByVal lPtrBuff As Long, ByVal lWriteSize As Long). I am assuming this means a pointer to the beginning of the data I want …

Member Avatar for clam
0
141
Member Avatar for Quan Chi2

How would I use getprivateprofilestring to get random lines from an ini file that looks like this? [quotes] 1=blah 2=blah 3=blah etc.. Thanks in advanced!

0
69
Member Avatar for vikster

i am new to this concept of make files.. i would liek to know as to how to use it..... i was given an assignment to make a calculator using C and to also provide a make file... i have looked up on the net and have understood as to …

Member Avatar for bops
0
81
Member Avatar for higherGround574

if anyone knows of some good tutorials or links covering the how/to's of programming C completly off of linux command line... inputs would be greatly appreciated ... --thanx

Member Avatar for l3.azarmehr
0
115
Member Avatar for indianscorpion2

hi my name is srikanth.i need to compile and execute c programs on red hat linux.please tell me how to do so.

Member Avatar for SpS
0
90
Member Avatar for Drowzee

Hello, all. I'm looking through the code I'm altering for MFC, and I found these variable printf lines. [code] printf("%s%s","|Val=",outString); [/code] and [code] printf("|type = 0x%x\n", type); [/code] Of course I understand how the latter one works, but the former is confusing. It seems to output just like the second …

Member Avatar for Ancient Dragon
0
93
Member Avatar for yaniv

Here it is... Design, write, and compile a program to determine if the digits in a three-digit number are all odd, even, or mixed odd and even. Your program should prompt the user to input a three-digit number and echo-print the number. If the digits in the number are all …

Member Avatar for yaniv
0
2K
Member Avatar for DotNetUser

I need to change the cursor in a static member function but I receive a compiler error error C2671 : static member functions do not have 'this' pointers this->Cursor = System::Windows::Forms::Cursors::Default; How do I modify the code so it will work in a static member function? Thanks.

Member Avatar for DotNetUser
0
109
Member Avatar for Micko

Hello, copying from one file to another is a simple matter. In C it's something like this: [code] int main(void) { FILE * fp1, * fp2 ; int buff; fp1 = fopen ("name", "rb"); fp2 = fopen ("name", "wb"); while ( (buff = fgetc(fp1)) != EOF) { fputc(buff, fp2); } …

Member Avatar for Narue
0
622
Member Avatar for winbatch

I frequently use maps to store pairs of data. A large percent of the time I use it to store a mapping between a value and how many times it occurred. What I would like to do in one particular scenario is to provide the output sorted by the value …

Member Avatar for winbatch
0
353
Member Avatar for Mahen
Member Avatar for kokopo2

hi people, i am having some problems, perhaps understanding about how dynamic memory allocation works with pointers and arrays. Im trying to get the user to input the size of the string in my program and allocates a certain amount of memory to hold the string of the size. Next, …

Member Avatar for bumsfeld
0
136
Member Avatar for Kraken

<< moderator edit: split thread ([thread=108]original[/thread]) >> Let me make one thing clear right of the bat, I do not work with code in any way shape of form. But Graphics are a different story all together. We are setting up to start a game soon, so, I have had …

0
61
Member Avatar for aripaka

Hi, I have tried a VGA mode in C with graphics.h which displayed graphics in 256 color but 320X240 resolution. I want to know the way to display graphics in 256 color in 640X480 resolution.Can anybody please help me.? Also I have tried to display a bmp file using graphics …

Member Avatar for vegaseat
0
238
Member Avatar for Mahen

Imagine that you made a program that accepts userinput in this format: cmd.exe or netscape.exe this is a good input and the program accepts it, but what if the user enters this: cmd or netscape Must the programmer Flag this as an error and allow the user to correct his …

Member Avatar for Narue
0
132
Member Avatar for aripaka

Hi, I am new to this forum and this is my first message. I want to know can we accesss a database though C or C++. Are there any library files as such for the same. Its nice to see that there is a lot of knowledge sharing in this …

Member Avatar for proghelper
0
279
Member Avatar for biozero

I am rather baffled as to why a relatively simple, but very reliable, bit of C code I wrote on a 32 bit unix system (Sun Solaris) will compile fine, but error out when compiled and run on a 64bit Linux system? The specific error I receive upon execution is: …

Member Avatar for kermit
0
110
Member Avatar for jasna

hello! i am in a great dilemma.iam a student.ilove writing programs and love experimenting. i was writing a code in C to enter all directories and their files(in my computer) into a hash table and then to search for the presence of a file.if the file is present,itmust display the …

Member Avatar for jasna
0
205
Member Avatar for Drowzee

I spent a few hours grappling with data corruption until I found something interesting. My code was getting crunched after a certain point because of an sprintf overwriting the first byte of the array right after it. After some research, I found something interesting and irritating. According to MSDN, [quote] …

Member Avatar for Drowzee
0
2K
Member Avatar for Sembiance

Hi folks :) I've been working on a C/C++ Source Code search website for over a year now, and just thought I'd let you all know that I put recently. It allows you to search over 136 million lines of open source C/C++ source code. It actually understands C/C++ syntax, …

Member Avatar for Sembiance
0
128
Member Avatar for deepakkrmehta

hello sir sir i am doing data structure using c but sir i have some problems in how to get algoritham complexity.please tell me which site contain full detail on algoritham complexity although i have read full chapter but some little bit confusion so plz sir thanx from deepak kr.

Member Avatar for Ancient Dragon
0
134
Member Avatar for Analogsleeper

I am having trouble setting the output format while using a pointer to a Filestream: [CODE] struct statLine{ int id; int primary_type; int secondary_type; double period; double epochnumber; int savedextremenumber; }statLine; void printStatLine(ofstream *FSOptr) { FSOptr->precision(7); *FSOptr << statLine.id << " " << statLine.primary_type << " " <<statLine.secondary_type << " …

Member Avatar for nattylife
0
153
Member Avatar for Busted

:confused: Could any one justify why is the result of the following code 100 100 100 99 99?? main() { static int arr[]={97,98,99,100,101,102,103,104}; int *ptr=arr+1; print(++ptr, ptr--, ptr ,ptr++ ,++ptr); } print( int *a, int *b, int *c, int *d, int *e) { cout<<*a<<" "<<*b<<" "<<*c<<" "<<*d<<" "<<*e<<endl; }

Member Avatar for Ancient Dragon
0
101
Member Avatar for harshchandra

if i write [code] if(printf("C is Wonderful") { } [/code] It worked. But if i write [code] if(cout<<"C is wonderful") { } [/code] Can anyone tell me whats the reason behind it ?

Member Avatar for harshchandra
0
225
Member Avatar for Drowzee

I'm trying to do some inheritance/polymorphism, and so I'm making a parent class. This is in the header. [code] class CProtoType { public: CProtoType(){}; virtual ~CProtoType(){}; virtual CString field1(); virtual CString field2(); virtual CString field3(); virtual CString field4(); virtual CString field5(); }; [/code] And this is the source: [code] #include …

Member Avatar for Drowzee
0
122
Member Avatar for akoloff

Here the code where I'm trying to set last-accessed attribute of the file to some value. [code]hFile = CreateFile(szDestName.GetBuffer(255), GENERIC_WRITE | GENERIC_READ, FILE_SHARE_WRITE | FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0); GetFileTime(hFile,&createTime,&accessTime,&writeTime); writeTime.dwHighDateTime -= 1000L; accessTime = writeTime; SetFileTime(hFile,&createTime,&accessTime,&writeTime); // at this point access and write(modified) times are equal CloseHandle(hFile); // at …

Member Avatar for Ancient Dragon
0
183
Member Avatar for konacious

I am having problems with the most important section of this program. I must admit after reading, I understand the concept, but applying it to this particular program is not coming through. I am attaching the source code but the portion I am having problems with is the following: void …

Member Avatar for Ancient Dragon
0
192
Member Avatar for sleevetrick

hey every1. i have a pretty silly problem.. i dont quite know how to display a text from FPGA cHIP to a monitor.. u can take a look at this code if its of any help... [code]#define PAL_TARGET_CLOCK_RATE PAL_PREFERRED_VIDEO_CLOCK_RATE #include "pal_master.hch" #include "pal_console.hch" #include "pal_keyboard.hch" #include <stdlib.hch> /* * Forward …

0
79
Member Avatar for nico
Member Avatar for konacious

Okay fellows. I got a really tough one. I got it licked pretty much except for one part. This is the implementation of the ADT DigitalTime. You are to enter two different times in military format (i.e. 1:30 pm is 13:30. It is suppose to spit out how much time …

Member Avatar for Member #46692
0
357
Member Avatar for akoloff

to protect the shareware program how do i detect that system time/date has been changed or reset i want to stop my shareware program if i detect that the clock been reset. how do i do that?

Member Avatar for Rashakil Fol
0
82
Member Avatar for Clint1982

Hello ! My name is Clint, I'm learning at the Ben Gurion University in Israel, I make a research about viruses, how they work, way of operation, classify them into families. Does any one know sites which can be helpful to my research ? Thank you, Clint.

Member Avatar for jwenting
0
81
Member Avatar for kokopo2

Hi pros and experts. I am experiencing some trouble in doing up a code which could evaluate the input into the different data types. What i managed to acheived is to read a file and its content. I used strtok to break the string into various 'tokens'. Now the problem …

Member Avatar for Dave Sinkula
0
504
Member Avatar for altheastronut

Hello, I'm almost done with my program however I'm having trouble getting what I want printed to a file. I'm familiar with the printf function and what I want is to print out to the file in scientific notation, which would be %E if I were using printf. Is there …

Member Avatar for altheastronut
0
375
Member Avatar for sx3

For this assignment i must replace all unprintable characters by escape sequences. So, the program must do the following: Read each character of the file, and 1) if that character has an escape sequence, print the escape sequence, even if the character is printable. 2) if the character is printable …

Member Avatar for Ancient Dragon
0
168
Member Avatar for Daishi

This has been bothering me for a while now. When I try to clear a vector it just *pretends* to clear it, and the data is still in memory. This led to some obscene memory leaks, so I dug around looking for a way to really clear out a vector, …

Member Avatar for Daishi
0
259
Member Avatar for sDJh

Hello everybody, I just signed up, 'cause I looked through the internet over days to find a solution for the BASIC function GetKey(). It simply returns the Scancode of a key pressed by the user or 0 by default (if no key was pressed). I found the well known BIOS …

Member Avatar for sDJh
0
232
Member Avatar for RITZY_G

:cry: i'm so confused right now, can any one help with this? defining a functoin bool prime (int n) which prints 10000 prime numbers

Member Avatar for jwenting
0
162
Member Avatar for konacious

I have a program that is designed to read in a line of text and ouptut the number of words in the line and the number of occurrences of each letter. A word is defined as any string of letters that is delimted at each end by either whitespace, a …

Member Avatar for konacious
0
334
Member Avatar for levk

Hi, I get a segfault when I try to instantiate a class I wrote. I don't know what the problem is here. The constructor is never entered. Details: [code] /* Connection.h: */ class Stream { private: ACE_Message_Queue<CONNECTION_SYNCH> *serverq; Provider *provider; ACE_Event_Handler *serverp; public: Stream(ACE_Message_Queue<CONNECTION_SYNCH>*, Provider*, ACE_Event_Handler*); ULONG send(char*, size_t); ULONG …

Member Avatar for levk
0
187
Member Avatar for winbatch

I keep getting a core dump (bus error) on my program. I suspect it has something to do with the amount of data I am storing in a map<string,string> The program crashes however when it is done processing and is actually destructing. Before I post any code, I was wondering …

Member Avatar for winbatch
0
157
Member Avatar for Raven11

Here is a source code I found while searching google for API functions. The source will generate a header file from a source file, anyways reading it you can learn a lot. [url]http://www.hwaci.com/sw/mkhdr/makeheaders.c[/url] I also know you can generate header files from a compiled .dll file. Sounds interesting but seems …

0
78
Member Avatar for Mahen
Member Avatar for Mahen

if you rightclick on cmd.exe and click properties, you will see in the property sheet that cmd.exe is described as "Windows Command Processor". Is there any way to read this string and display it on screen programatically, especially in console mode

0
53
Member Avatar for gabe522k3

Hi can anybody help me with this program? Thanks Write a program that reads a file with a record containing a user id number (SSN), a course number (2 letters and 3 numbers, e.g. IT303), a letter grade, and the number of credit hours. Using a case statement, determine the …

Member Avatar for gabe522k3
0
143
Member Avatar for levk

If I have two templates that are mutually dependent, is there a way to declare one without defining it?

Member Avatar for Narue
0
149
Member Avatar for indianscorpion2

hi could anyone please tell me in detail about the parameters to the main function argc and argv.please let me know as much as possible.

Member Avatar for Rashakil Fol
0
285
Member Avatar for Arhianne

hi guys i really need your help about my project.... my project goes like this.......CREATE A C PROGRAM THAT WILL ILLUSTRATES CPU SCHEDULING ALGORITHM TECHNIQUES IN GRAPHICS AND PULL DOWN MENU MODE.... IM hoping for your reply soon... thank you in advance....God bless you all.... :cool:

Member Avatar for Dante Shamest
0
138
Member Avatar for bruce3210

hi guys and gals, just a young padawan learner trying to write this poker program from scratch. i know their are programs out their but nothing like the one you write your self. Im trying to have my program read in the number of players from the keyboard input. I …

Member Avatar for BinaryMayhem
0
185
Member Avatar for Judas

How do i convert value back to const char [code] #include <stdio.h> #include <iostream> using namespace std; int main() { int i, value; const char text[] = "456"; for (i = 0, value = 0; text [i] != '\0'; ++i) { int digit = text [i] - '0'; value = …

Member Avatar for Judas
0
116

The End.