15,551 Topics
| |
Well, I have a small problem with checking the data type input by user. I want to make sure that the data got from keyboard must be "int" type. If User gives us another data types such as "char", "float, etc the program should report an error!!! :!: | |
Hey guys I am using code like the following: But I would like to say if a semi colon appears at any stage after a ")" (closing bracket) add one to count. Any advice thanks. ( I am also using a char array and not a string, unfortunitly I have … | |
So, the question is simple... in 'C' we have calling conventions in FUNCTIONS. Why? why we cann't(don't) build compilers,libraries to make our own calling conventions like... func()(lr);-for left to right calling convention. func()(rl);-for right to left calling convention. :eek: | |
Is there a function that I can use that given a few vectors which elements are common to all? for example vector<int> a; vector<int> b; a.push_back( 1 ); a.push_back( 2 ); a.push_back( 3 ); a.push_back( 4 ); b.push_back( 2 ); b.push_back( 4 ); Something that will give me back the … | |
hiiiiiiii...........i want to access random lines within a text file in my program,plz help me!!!!!!!!!! :rolleyes: | |
How do i get from 2 character words to 4 character words or 5 character words?? can anyone show me how to do that plz... Q) Consider a language of words, where each word is a string of dots and dashes. The following grammar describes this language: <word> ::= <dot> … | |
Inheritance Create a class called Rectangle so that, given a height and width, the object would calculate and display the length, width, the perimeter, and the area. Do not include a constructor for this class Another class called Box is derived from the Rectangle class. This class given the breadth … | |
Hey guys I have been trying to expand the following code but have had no luck, is there anyway I could also make this code say if the previous character is space or a is comma? Thanks. [code] //temp is the array ch is a char pointer if( ch == … | |
im not sure exactly what its called or how to use it.. but im guessing its used to pass over variables as arguments to a function, ive only seen it in functions with this added after it: [B],...)[/B] somewaht similar to the code below.. [code]int myfunc(char *data,const char *data2[B],...[/B]) { … | |
I have an assignment of the following. Create a class named Fractions having two integer data members named for a fraction’s numerator and denominator. The Class’s default constructor should provide both data members with default values of 1 if no explicit user initialization is provided. The constructor must also prohibit … | |
Below is my assignment. If I understand this correctly pivot as a median is the middle of the highest, middle, and lowest numbers. In this case 35 (14, 35, 72). Please correct me if I am wrong. I do not understand how to do part b. Could someone please explain … | |
hey guys, I am using the following code to count from a text file but I also want to check for ",jo " as well as "jo " I was trying to do it by using while((ch = strstr( ch, "jo ")) != 0) || while((ch = strstr( ch, ",jo … | |
Please tell me how to input password by showing a * or other symbol on console instead of text in C. | |
I wanted to calcualte the execution time of Bubble sort or for that matter any loop . i tried using the clock funtion in c but it gives me 0 seconds for even 10000 elemnts being in the list :sad: . | |
Hello, I'm wanting to know whats in the string and where: I've got this code [code] string s1="HelloWorld"; if(s1[5] = "W") [/code] now then if i want to know if World is in the string. I've tried doing: the if.... but it errors: [quote] : error C2446: '==' : no … | |
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 … | |
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 |
The End.