19,876 Topics
![]() | |
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> /* … | |
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 … | |
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 … | |
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 | |
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[] = … | |
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 … | |
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 … | |
[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 … ![]() | |
hi ya, is there any sample dll available whereby i can used to perform audio signal measurement using sound card? plssss help :cry: :cry: ..... | |
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 … | |
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 … | |
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 … | |
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 … | |
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; … | |
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 | |
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 … | |
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. | |
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 … | |
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. :?: | |
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 | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … ![]() | |
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 … | |
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: … | |
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 … | |
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 | |
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 … | |
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 | |
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 … | |
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. | |
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.. :?: | |
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? ![]() | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? … | |
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 … | |
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 … | |
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? | |
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!!! | |
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 … |
The End.