15,550 Topics

Member Avatar for
Member Avatar for Jon182

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 …

Member Avatar for Jon182
0
127
Member Avatar for anupam_smart

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:

Member Avatar for Ancient Dragon
0
115
Member Avatar for winbatch

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 …

Member Avatar for Narue
0
121
Member Avatar for Sulekha

hiiiiiiii...........i want to access random lines within a text file in my program,plz help me!!!!!!!!!! :rolleyes:

Member Avatar for KorB
0
87
Member Avatar for jack223

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> …

Member Avatar for jack223
0
160
Member Avatar for brianotieno

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 …

Member Avatar for Rashakil Fol
0
100
Member Avatar for Jon182

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 == …

Member Avatar for Ancient Dragon
0
225
Member Avatar for osean

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]) { …

Member Avatar for osean
0
167
Member Avatar for rgrwalker

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 …

Member Avatar for rgrwalker
0
179
Member Avatar for btech

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 …

Member Avatar for Narue
0
109
Member Avatar for Jon182

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 …

Member Avatar for Jon182
0
83
Member Avatar for harrypotter

Please tell me how to input password by showing a * or other symbol on console instead of text in C.

Member Avatar for agiorgio
0
120
Member Avatar for niceguy21
Member Avatar for Ancient Dragon
0
87
Member Avatar for ultra vires

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: .

Member Avatar for bumsfeld
0
152
Member Avatar for Acidburn

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 …

Member Avatar for Bench
0
192
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
173
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
150
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
100
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
336
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
107
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
122
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
80
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
260
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
827
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
109
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
118
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
145
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
192
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
68

The End.