19,876 Topics

Member Avatar for
Member Avatar for perlsu

I want to change isOpen variable in main function from threadfun. But , the following code doesn't change the isOpen value in main fun . So, main stay forever in while loop even though the thread fun finished. Thanks a lot in advance. Rgds, perlsu #include <windows.h> #include <process.h> /* …

Member Avatar for Salem
0
176
Member Avatar for Jon182

Hey guys, I now want to make a program to count simple integers my first problem is that the following code will also count the word hint as an int. I was wondering if there is an easy way round this problem? (I tried putting whitespace after the word like …

Member Avatar for Jon182
0
158
Member Avatar for lilprincss10881

Can't figure out why I have the error...The error is: C2181: illegal else without matching if....My program is: #include <iostream> using namespace std; int main() { int x=300; //this is the room capacity int y=0; //number of people int z=0; //this is the equation answer int m=0; //this is the …

Member Avatar for WolfPack
0
80
Member Avatar for cppbeginner

Hello, I have a char array and an integer value which i have to concatenate...pls tell me how to convert them and concatenate them. thanks

Member Avatar for Ancient Dragon
0
101
Member Avatar for crusty_collins

I am using strtok to parse the argv. On windows it works just fine but on Solaris I get a fault. I have traced it down to the "$" character on the command line. [CODE] char *result = NULL; char *value = NULL; char *argPointer = NULL; char delims[] = …

Member Avatar for crusty_collins
0
342
Member Avatar for nemo

a derived class inherits [B]all members [/B] of the base class, that is what the book says, right? i want to make a derived class that has only some of the members of the base class, and some of its own members and functions, is it ok to do it …

Member Avatar for nemo
0
110
Member Avatar for server_crash

Okay, I can't find a thread that I posted to just yesterday and recieved an email showing a nice reply by Narue, but I deleted it. I can't find that thread! Was it deleted? If it was, Narue, can you explain the reason atoi() is bad and the better way …

Member Avatar for Narue
0
1K
Member Avatar for tomoyo_13m

[COLOR=DarkOrchid]i have a case study.... my prof said that we should display 10 random numbers without repeating the same number for example the screen will print numbers from 0-9 at this order 1 6 7 5 2 3 4 9 8 0 then when we exit the program it should …

Member Avatar for iamthwee
0
125
Member Avatar for Kimmi

hi ya, is there any sample dll available whereby i can used to perform audio signal measurement using sound card? plssss help :cry: :cry: .....

0
81
Member Avatar for bashi

Design and implement a class hierarchy for any organization, employees. We are interested in modeling only the Managers and Faculty. Director shall be treated as a Manager. The following information for each employee needs to be captured: First Name, Middle Initial, and Last Name All of above are of type …

Member Avatar for Bench
-1
261
Member Avatar for perlsu

I have a problem in converting char to integer. My code is as follow: char lang [2][4] ={"en","fr"}; char ch = lang[0][0]; int i = sprintf("%d",ch); //want to get integer value of 'e' in string "en" ch = lang[0][1]; int j = sprintf("%d",ch); The error is "sprintf cannot accept parameter …

Member Avatar for Narue
0
832
Member Avatar for crusty_collins

Hey, I am a newbie to all of this so please don't flame me for a stupid question. I am trying to write a shared lib that will initialize a connection to a messaging deamon. Then the library will be called at intervals and send data. My problem is that …

Member Avatar for crusty_collins
0
111
Member Avatar for jack223

This is one of my hw question and I can't find the answer from the textbook. Question: A function that modifies an array by pointer arithmetic (e.g., ++ptr) to process every value should have a parameter that is? a) a nonconstant pointer to nonconstant data b) a nonconstant pointer to …

Member Avatar for jack223
0
120
Member Avatar for AhmedHan

I wrote down a program code that recognizes the keyboard as an HID device and gets input (the key pressed) from it. Then displays it on an edit control. Here is the code :[CODE]#include "stdafx.h" #define _WIN32_WINNT 0x0502 #include <windows.h> #include "HID Input.h" #define MAX_LOADSTRING 100 RAWINPUTDEVICE Rid; USHORT usVKey; …

Member Avatar for AhmedHan
0
149
Member Avatar for perlsu

I use Win 32 API for thread creation : unsigned long _beginthread( void( __cdecl *start_address )( void * ), unsigned stack_size, void *arglist ); How do I pass the multiple parameters to arglist? Thanks a lot. Rgds, perlsu

Member Avatar for WolfPack
0
194
Member Avatar for perlsu

I use CSocket with send() and recv() to send and receive structure packets of type Packet as follows: class Packet { int dataLen; char data[1024]; } packet; I tried but the received structure elements contained garbage. What would the code be on the send and receive sides of the app …

0
70
Member Avatar for sark4_rahul

guys, I have a big problem. I want someone here to just read the charecters from the attachment to another file using c. The file is AES encrypted.Forget the encryption.Just read those encrypted chars and write to another file. thanks.

Member Avatar for Narue
0
88
Member Avatar for perlsu

Hi all, My csocket program is as follow. The program run properly but the server don't wait the message from client and the client also don't send. Can anyone help me what's the problem in client server communciation API. Thanks a lot in advance. #include <afxwin.h> // MFC core and …

Member Avatar for WolfPack
0
238
Member Avatar for SkyFlyer1312

I have a program that need some help. I've attached a zip file for the codes. The main problem is that I need to have the RoomRate edited2 (that must include the friend and overload function) work with the main function. Any help is always very much appreciated. :?:

0
74
Member Avatar for perlsu

I'm trying to compile a program and the 3 linker errors I get are: Linking... nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex Can anyone help me. Thanks., rgds, perlsu

Member Avatar for Narue
0
55
Member Avatar for thinhbk1802

Hi everybody. I have a problem with my program. I want to make a program that can display the Fibonacci, but the number of term i must display is 2147483647. So there is a float number problem. How can i do it with fast speed.

Member Avatar for SpS
0
111
Member Avatar for Acidburn

Hello, the code is quite big so I'm hoping someone can help based on the errors reported: [quote] D:\Scanner\lexicalScanner.cpp(185) : error C2440: '=' : cannot convert from 'char *' to 'char' This conversion requires a reinterpret_cast, a C-style cast or function-style cast D:\Scanner\lexicalScanner.cpp(197) : error C2440: '=' : cannot convert …

Member Avatar for Narue
0
77
Member Avatar for Acidburn

Hello guys. I've got a query which is most likey really simple. I've got an array of char's thats : char temp[10] = "abcd"; I'm wondering why I can't put these into char a; since char a = 'abcde' would be legal right? Or can a single char only hold …

Member Avatar for Narue
0
128
Member Avatar for muthuivs

I am now trying to print the output to a RTF template that will defintely work since I have my formatting saved in the template but once my program writes to it , the formatting in the RTF is all deleted. Any Idea how to get around that? It doesn't …

0
69
Member Avatar for andrax

I'm writting a program where I need the coordinates of the mouse when it's clicked inside the client area. For some reason, the coordinates seem to be in base 21, maybe higher (I've seen the character k). I'm not sure why this is happening. Here's the mouse section of the …

Member Avatar for WolfPack
0
94
Member Avatar for darkstar80

hi! im writing some code about a banking system i have done so far the classes and functions to create account, save date in a text file find account by last name show account info and although i can read from the file the amount of a client i cant …

Member Avatar for Lerner
0
91
Member Avatar for kharri5

I know I've been posting a lot into this forum with questions that might seem....dumb, but I am learning a lot actually from those questions and the help I've been given. Many thanks( mostly to Rashakil Fol. I salute you sir!) The latest and greatest problem, is that I'm not …

Member Avatar for kharri5
0
133
Member Avatar for Acidburn

Hello, I've been asked to make my own user defined type. when we've got this on an imput stream (a+b+c$) the a = ID b = ID c= ID how can I say that when its not a reserve word assisn ID to the a,b,c? I know this is a …

Member Avatar for iamthwee
0
203
Member Avatar for Nedals

I'm attempting to build a simple listener, preferably without a Thread, but I am lost. I have a working listener in 'console' mode but I need one that works with MFC. It should stay open indefinately - (until I send a shutdown message) This is my initial non-working attempt. It …

Member Avatar for Nedals
0
276
Member Avatar for Acidburn

Hello, I've got this array defined as a global just to test... [code]char RW[100];[/code] but its giving me grief when I try to use strcpy with it... I'm putting since varibles and longer ones too thats all I can think of as the cause of my problems .. error quote: …

Member Avatar for Acidburn
0
130
Member Avatar for pietromele

I have a huge set of small objects that work differently, but with a common interface. They have to stay in the same container. I cannot use templates, because I need run-time polymorphism. **Run time efficiency is critical** Can anybody tell me which of these options is the most efficient …

Member Avatar for Ancient Dragon
0
117
Member Avatar for rasheed1982

Hi I Have One Doubt. Is It Possible To Find The Large Value In A Set Of Numbers Without Using If Statement? Plz Give Reply To This

Member Avatar for rasheed1982
0
100
Member Avatar for Nurul Dee

i have a problem to simulate program on array-based list :rolleyes: :sad: .The array can store 10 integer value.The application should be perform basic operation such as inserting,deleting and displaying the array's content :rolleyes: .Any extra operation are welcome.The application should promt user a menu as follow : 1)insert value …

Member Avatar for Nedals
0
361
Member Avatar for ganeshpujar

Hi all, This is my First Thread :) I want to do some certification on C/C++. Please let me know the Certifications possible on the same. Let me know the links about the same. Thanks a lot in Advance. GmP. PS: Some Infomation can change SomeOnes LIFE

Member Avatar for Narue
0
50
Member Avatar for cesarmas

Please can somebody help me .......... I have no idea on how to implemenet a program to benchmark functions such as insertion , deletion and iteration and deuqe. I know that I have to use the clock_t function but I can not figure out, if I need to call the …

Member Avatar for kc0arf
0
127
Member Avatar for ani_manit

Hi I am in III yr engg. Any1 wid any programming experience on steganography and/or Virtual Private Networking, please help. Your valuable suggestions are welcome. Also please suggest any other good topics for a minor project. I am out of my wits at this.

Member Avatar for Narue
0
173
Member Avatar for michika

hi.. just want to ask if <fstream> is really needed in making a program for round robin scheduler? im currently taking my os class and our project is to make a code for RR.. :?:

Member Avatar for michika
0
99
Member Avatar for muthuivs

Anyone know what function will copy contents from one folder to another, I know the source folder and the destination aso I dont have to use the mkdir. Any Ideas?

Member Avatar for iamthwee
0
135
Member Avatar for K_te_J

I am converting some code from C into delphi pascal and have come to a brick wall. As my understanding of C is quite limited i am unsure of what '%*.*ld' is doing or how to do the same thing in Dephi. The full line is a bit long to …

Member Avatar for Narue
0
451
Member Avatar for yoshi4483

I'm trying to write a pseudocode for finding the area of a trapezoid. Is this right? THIS IS THE GIVEN INFORMATION Write a Fortran 90 program to compute the area of the trapezoid. Upon execution of the program, the user (you) will be prepared to provide the lengths of the …

Member Avatar for yoshi4483
0
219
Member Avatar for btech

I have a question about hashing. If you have a hash table that is 101 in size. and the items are inserted into the table using quadratic probing. I want to insert a new item with address 30. If position 30 in the hash table is occupied and the next …

Member Avatar for Narue
0
117
Member Avatar for muthuivs

Good Day, As u can see I have been away from programming for a while and I have a task that desperately needs me finsh a program. I am trying to use the rename(arg1,arg2),feature of c to rename files on the system. Since the path to these files are long …

Member Avatar for muthuivs
0
971
Member Avatar for server_crash

I have a matrix class which there are matrix objects. I want to call `.value(int,int)` directly on the matrix objects and set the internal 2d vector to the value on the right side of the equal sign. Here is what I want to do: new_matrix.value(row,col) = 0; Here is what …

Member Avatar for SpS
0
162
Member Avatar for johnroach1985

Hi.I have been trying to write a simple program that teaches how to read and write Japanese.Unfortunately not every windows does not support Jpanese characters.So like when my program starts I have a pop up which has to give a japanese chared message altough I write the code as such …

Member Avatar for AhmedHan
0
390
Member Avatar for hinduheads

Hello Everybody, How Are You? I Have Always Wondered About How Does The 'compiled' Library Files And Our Source Code Get Fused Into One. Since The Compiled Files Must Be In A Binary, How Does The Compiler Understand Them So As To Pick Up Only Right Functions Etc From It? …

Member Avatar for kon_t
0
79
Member Avatar for WittyFool

Quick question while learning C++: Say you have class A, you can instantiate an object of class A like: A a; And then you can do stuff with that class (eg, a.method(), etc.) But you can also do: A a = new A(); And do stuff with that, and delete …

Member Avatar for kon_t
0
139
Member Avatar for ilikerps

Hello, I know this is probably a very elementary answer, but how does one convert a character into a character pointer, for use strcpy()? For instance, I need this: [CODE] char sendBuffer[5]; char ch; // assume code in between makes ch something strcpy(sendBuffer, (char*) ch);[/CODE] However, the console window that …

Member Avatar for ilikerps
0
159
Member Avatar for Micko

Hello, suppose I have a class defined in the following way: [code] class Test { //bla bla }; [/code] Is there difference between these two forms: [code] Test* pt = new Test; [/code] and [code] Test* pt = new Test(); [/code] Do these parenthesis mean something?

Member Avatar for Ancient Dragon
0
62
Member Avatar for anisa

I just wanted to know some advices on the classes I should use to create an airline booking program. The homework I have requires that I have to take input from a file and also to output also the information to a file-that makes also another problem...I need help!!!

Member Avatar for jwenting
0
96
Member Avatar for JoBe

Hello ladies and gents, I'm trying to include a copy constructor and an assignement operator into this code wich has two separate classes, the idea is to copy the last name that was entered. Problem is, I can't seem to grasp how to get acces to the copy constructor in …

Member Avatar for Lerner
0
340

The End.