174 Topics

Member Avatar for
Member Avatar for newGains

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

Member Avatar for newGains
0
255
Member Avatar for gronkite

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 …

Member Avatar for valdez25
0
246
Member Avatar for ndrichim

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 …

Member Avatar for ddanbe
0
85
Member Avatar for Doogledude123

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 …

Member Avatar for Doogledude123
0
368
Member Avatar for Alexkid

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 …

Member Avatar for deceptikon
0
4K
Member Avatar for unsensible

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 …

Member Avatar for unsensible
0
2K
Member Avatar for AutoPython

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 …

Member Avatar for rubberman
0
429
Member Avatar for jay.zyzz

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

Member Avatar for jay.zyzz
0
9K
Member Avatar for Khav

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 …

Member Avatar for diafol
0
2K
Member Avatar for borchu

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

Member Avatar for mrnutty
0
317
Member Avatar for phfilly

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 …

Member Avatar for WaltP
0
387
Member Avatar for paul9519

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 …

Member Avatar for Tumlee
0
209
Member Avatar for anisha.silva

hi, how can i check for a word that has noncharaters in it, as like sdf4df, 4rtrt, 909erter, appreciate a reply, thanks

Member Avatar for anisha.silva
0
115
Member Avatar for jaimin4829

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 …

Member Avatar for Begginnerdev
0
118
Member Avatar for FUTURECompEng

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 …

Member Avatar for FUTURECompEng
0
168
Member Avatar for Subodh11

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

Member Avatar for Ancient Dragon
0
140
Member Avatar for superchica08

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 …

Member Avatar for superchica08
0
296
Member Avatar for nchy13

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 …

Member Avatar for nchy13
0
347
Member Avatar for rayidi

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 …

Member Avatar for iamthwee
0
183
Member Avatar for lesliebielski

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 …

Member Avatar for lesliebielski
0
194
Member Avatar for Qonquest

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 …

Member Avatar for deceptikon
0
993
Member Avatar for Lord_Migit

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

Member Avatar for Lord_Migit
0
192
Member Avatar for learner_new
Member Avatar for NathanOliver
0
6K
Member Avatar for SCass2010

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 …

Member Avatar for L7Sqr
0
2K
Member Avatar for trishtren

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 …

Member Avatar for WaltP
0
384
Member Avatar for Lucaci Andrew

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 …

Member Avatar for Ancient Dragon
0
254
Member Avatar for nyuszi

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 …

0
95
Member Avatar for nyuszi

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 …

0
113
Member Avatar for hwoarang69

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 …

Member Avatar for hwoarang69
0
142
Member Avatar for shifat96

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 …

Member Avatar for shifat96
0
2K

The End.