174 Topics
|
|
i am trying to use recursion to find the occurence of a specific character in an array of characters public class CharacterCounter { public static void main(String [] args) { char test[] = {'a', 'b', 'a', 'c', 'd', 'a', 'e', 'a', 'f', 'g', 'h', 'a', 'i', 'a'}; char searchChar = … |
|
Hi I am trying to write a binary search function to search for a specific character in a character array sorted in ascending order. Whenever I run the code though nothing happens, there are no errors or anything, just nothing happpens until I terminate the program myself. Below is my … |
|
Hello frinds. i want to create a blog.in a table will be a short brief about any story.and when thhe user clicks on a part of that short text it will direct him into a full page with the full text.I have puted them into a table but i dont … |
|
Hey guys, I need a function that reads a text file and stores the character someway, (I am assuming a 2D Array would be best?) then a function that reads through the characters and if the char is something specific (like "X") then it would draw a square (QUAD) 10wx10h … |
|
Hi there, I have an array of unsigned chars SOURCE, i need to combine into DESTINATION, i want to turn: SOURCE[0] = 3 SOURCE[1] = 9 SOURCE[2] = ' ' SOURCE[3] = 0 SOURCE[4] = 4 SOURCE[5] = ' ' SOURCE[6] = 7 SOURCE[7] = d into DESTINATION[0] = 39 … |
|
ok so as a homework assignment I have to sort a c-string array alphabetically. We have to use pointers and cannot using strings (although strcopy and strcmp can be used). I can sort integers and strings but for the life of me cannot figure this out. I'm pretty sure i'm … |
|
I've been at a loss as how to convert the std::string to char (Line 40). I've tried c_str() and a few other things, but it's really confusing when the pointers are thrown in there. I know I'm kind of asking you guys to do it but I don't know what … |
|
**Tic-Tac-Toe without a class** Write a modular program that allows two players to play a game of tic–tac-toe. Use a two-dimensional char array with 3 rows and 3 columns as the game board. Each element of the array should be initialized with an asterisk(*). The program should display the intial … |
|
Greetz to you all Well i have an array that contain some characters and i want to check if they form part of a string.If yes then they should be deleted How to do this via php For e.g $string = 'Dani.web'; $charRemove = array('.','-','~','#','!','(',')','+',','); I want to get a … |
|
Hello, I have a problem about counting consequtive characters, here my code char query[] = "tttthe oneZZZZZ trully loveeee"; void cntfreq(char A[]) { int j; int k=0; j = 1; while (A[j] != '\0') { if (A[j-1] == A[j]) { ++k; cout<<k<<"\t"<<A[j]<<endl; } else k = 0; ++j; } } … |
|
Hi guys! So I need help with a small problem. I'm using a char pointer array which contains a mathematical expression. For example: "sqrt 25" Now I want to use the inbuild c++ function `sqrt(int))`. I'm first searching in the array for the letters 'sqrt' so that my custom function … |
|
hi everyone i have a problem with this code below. when i try to read all the files in a directory i can but when i try to put them in a vector, it doesn't work, all the elements in the vector become the last element added. I'm not sure … |
|
hi, how can i check for a word that has noncharaters in it, as like sdf4df, 4rtrt, 909erter, appreciate a reply, thanks |
|
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click Try Dim usr, pswd As String Dim i, n As Integer obcon.con.Open() obcon.cmndcon() obcon.cmnd.CommandText = "select count(*) from users " n = obcon.cmnd.ExecuteScalar MsgBox("n=" & n) For i = 1 To n Step 1 obcon.cmnd.CommandText = "select usr_name … |
|
I have the user input a sentence (example " Hello this is some jello "). I already have that complete by having a method to do this. What the method does is take a user input (.nextLine) then stores the words of the sentence into String[] words and I use … |
|
plz help me to solve the error in this program : Given programs replaces multiple spaces with only one space... there is no error , but it shows "Segmentation Fault"...whats the issue ????????? #include<stdio.h> int main(void) { char *t="ALOK KUMAR ASHISH KUMAR ANKUSH"; char *c; int n1=0; while (*t) { … |
|
hello everyone I really need help so I have to make functions that find vowels, digits and uppercase and lowercase letters from a sentence inputted. So i was able to do it all in main but i cant seem to make the new program work with the functions properly, it … |
|
i am getting weird result here. if condition at line 25 is satisfied only 4 times while reading cpuinfo but **cores** is modified each time while loop iterates. i am not able to think of anything that may cause this. any help of any sort is appreciated. #include <stdio.h> #include … |
|
Dear All, I'm struglling with one small prblm with my code. // Charecter count $(document).ready(function (){ $('#msgbx').click(function(){ var charLength = $(this).val().length; $('#charcount').html(charLength + ' of 250 characters used'); // Alerts when 250 characters is reached if($(this).val().length > 250){ $('#charcount').html('<strong>You may only have up to 250 characters.</strong>'); }); }); Please help … |
|
I am in beginning Java and using Dr. Java to write my programs. I am trying to write an array that user input sets up the length of the array(#of students) that character grades are stored in. It is suppose to ask if you want a full print out, to … |
|
I am getting this output: This is the source stringâ• This is a destination stringâ• â• â• â• â• â• â• â• â• â• â• â• â• â• 5Press any k ey to continue . . . My code is: void Problem5(char strDestination [], char strSource []) { int intIndexOfStrSource = 0; int intConcatenatedStringIndex = 0; int intStringDestinationIndex = 0; int intLengthOfDestination = strlen(strDestination); int … |
|
Hi folks, just a queary about checking chars. I have a char[] variable. I ask the user a question and the user types a response and presses enter. I need to check the variable to see if it said particular things and more importantly if it said nothing. #include <iostream> … |
|
> what exactly is char **?? how is it used in getline function? |
|
Hi everyone, I was wondering if anyone could help - I'm trying to split up a char* that contains a string, something like "*Stephen*10:11:00*02/07/2012*Hi there" I'm trying to split it up so it gets the position of the first * then the second, and stores whats between them in name … |
|
Hey, Im having problems converting an integer to a character , it seems to either produce incorrect results when printed(usually some sort of ascii symbols) instead of the actual literal value. char* str; str = (char*)malloc(sizeof(char)); snprintf(str, 16, "%d", remainder[i]); cout << str; This is what im currently trying, but … |
|
OK, so here's the deal. I'm trying to create 2 programs, a server and a client, which communicates between them. I'm working on Ubuntu, throughout FIFO. So, 1st of all, I create 2 FIFO's: $ mkfifo pipe $ mkfifo pipo Ok, and after that I create the client and the … |
|
im making a program which uses binarys so convert decimal numbers, characters, strings to binary numbers and work with them. but i got stucked because i want to divide Bin with Bin. something like this: 11010110110000 / 10011 = 01001110110000 so the new number will the 1001110110000 / 10011... until … |
|
Hello, i want a program which convert Dec,Char,String to Bin. but i got stucked in Char because i want to do 8 bit long list and if its not 8 long i put zeros in the front but something always wrong. import Data.Char (ord) toBinary :: Int -> [Int] toBinary … |
|
lets say i have a i have a char array char left_var[] //-33x-4x+x this char left_var array has the value of "-33x- 4x+ x" and result should be "-33-4+1" and store in another array called in another word iam trying to get rid of x's and if there is only … |
|
I need help for another one of my assignments for CS Class. On the rubric, one of the part said: > all characters are shifted right by two positions and the last two characters becomes the first two characters The condition is that the string has to be entered by … |
The End.