158 Topics

Member Avatar for
Member Avatar for Riteman

Am working on a project right now and almost stuck at a point. Say, I have a text document with contents like: `abc,123.xyz;praise;end,file,clear` Now I want abc , 123 . xyz ; praise ... in an array. I used split method with array of characters. Though I retrieved abc,123,xyz,praise,end,file,clear I …

Member Avatar for ddanbe
0
3K
Member Avatar for Riteman

Am working on a project right now and almost stuck at a point. Say, I have a text document with contents like: `abc,123.xyz;praise;end,file,clear` Now I want abc , 123 . xyz ; praise ... in an array. I used split method with array of characters. Though I retrieved abc,123,xyz,praise,end,file,clear I …

Member Avatar for Riteman
0
596
Member Avatar for Alonso_1

So I'm trying to count the number of occurrences of each digit within an array. My code I've got so far looks like the following: #include <stdio.h> #include <string.h> int main() { int numbers [10]= {1, 4, 5, 5, 5, 6, 6, 3, 2, 1}; int count = 0; for(int …

Member Avatar for deceptikon
0
3K
Member Avatar for saimadanmohan

In the brute force pattern matching algorithm when all the characters in the pattern are unique then brute force can be implemented in Big-oh(n) complexity where n is the length of the string (reference: introduction to algorithms). can anyone help me with the algorithm? Thanks in advance

Member Avatar for stevedaniel
0
267
Member Avatar for lincy828

How could i convert One number system to another system? this is the output: Choose a number system below: Press A if you want Decimal to convert to another number system. Press B if you want Binary to convert to another number system. Press C if you want Octal to …

Member Avatar for ddanbe
0
369
Member Avatar for OWSOME.GUY

.model large .stack 100h .DATA STR1 DB "ENTER YOUR NAME HERE : $" STR2 DB "JABBAR$" INSTR1 DB 20 DUP("$") INSTR2 DB 20 DUP("$") N DB ? S DB ? NEWLINE DB 10,13,"$" MSG1 DB "HAPPY BIRTHDAY BRO MAY BLESSINGS OF ALLAH BE UPON YOU (^_^)$" MSG2 DB "SORRY It'S …

Member Avatar for OWSOME.GUY
0
229
Member Avatar for infiniteloop56

Hi, I have a quick question. I am making a hang man game for project (I am at university as a computer science major), I have completed most of the game but have run into one small issue which has been given me a big problem. Right now I am …

Member Avatar for JamesCherrill
0
379
Member Avatar for Judson

Hello I am working on this code for a hotel reservation. so far I am stuck on the part which requests that fridays and saturdays be charged 150 instead of the 120 usual cost per night. I have dateTime variables for the arrival date and departure date and a timeSpan …

Member Avatar for Judson
0
1K
Member Avatar for matt.harding.14203

I'm having trouble with this: import java.util.Scanner; public class triangleLoop { public static void main (String[] args) { int height, row, col, spa; String hyp; Scanner kbd = new Scanner(System.in); System.out.println("Enter the desired height of the triangle: "); height = kbd.nextInt(); System.out.println("What side do you want the hypoteneuse on? (left/right)"); …

Member Avatar for cmps
0
2K
Member Avatar for eldiablo1121

Hello, First of all I want to thank all the help with my posts. I have a program where I have to convert a phrase from lower case to upper case, but I cannot use any of the toupper() isupper() functions and vice versa. I think I almost got it, …

Member Avatar for eldiablo1121
0
2K
Member Avatar for RLS0812

For some reason my string is spitting out pure trash, and I have no idea why it's doing it. There are no errors kicked out when debugging. #include <iostream> #include <string> using namespace std; void main(){ string xx = ""; string yy = ""; for( int x = 0; x …

Member Avatar for Lucaci Andrew
0
160
Member Avatar for cshrikanth

Dear all, In the function below, how should the array of arrays data structure be defined and used? void foo(int option) { int i =0; char Colstr[3][15] = {"Red","Blue","Green"}; char Volstr[7][15] = {"1","2","3","3.5","4","4.5","5"}; char Sndstr[4][15] = {"lo","med","hi","vhi"}; int numSTrings[2] = {3,7,4}; char *arrayOfarrays[] = {Colstr,Volstr,Sndstr}; // How should this be …

Member Avatar for cshrikanth
0
136
Member Avatar for TheNotoriousWMB

I'm trying to write an algorithm for a larger project that will take two strings which are both large integers (only using 10 digit numbers for the sake of this demo) and add them together to produce a final string that accurately represents the sum of the two original strings. …

Member Avatar for Lucaci Andrew
0
160
Member Avatar for KhubaibQaiser

Hi all! I am making a program to input a paragraph from the user and then finds/swap/delete/insert a word in that paragraph. I am stuck on the first stage. I have made a program that just returns the starting index of the searched word. But its case sensitive and i …

Member Avatar for deceptikon
0
257
Member Avatar for arslanh

Develop a telephone directory which is capable of doing the following: 1. Insert a contact 2. Delete a contact 3. Edit an existing contact (changing or modifying a record) 4. Search a contact (and display complete record on screen) a. Search through first name b. Search through last name c. …

Member Avatar for Ancient Dragon
0
283
Member Avatar for Atlanta15Braves

I need to sort these strings in order and I have changed the code of my program which use to sort integers and now I need it to sort strings and I cannot get it to work, any help..... import java.util.Scanner; public class Strings { // -------------------------------------------- // Reads in …

Member Avatar for subramanya.vl
0
212
Member Avatar for Jenniferting

Credit card numbers follow certain patterns. A credit card number must have between 13 and 19 digits. It must start with for example: 4 for Visa cards 5 for Master cards 37 for American Express cards 6 for Discover cards So, this here is the code thats identify either a …

Member Avatar for Ancient Dragon
0
250
Member Avatar for muhammad.khan.3576

#include<string> int str_len( const char * const src) { int len=0; while(src[len]) { len++; } return len; } int str_copy( char * &dest, char * src) // removed (const) to sore the string in dest.By using const,we dont have the // access to store the string.By using ampersand we can …

Member Avatar for Gonbe
0
130
Member Avatar for joao.jose.520

Hellou. Can anyone tell me how can i save a string to a file? I have this function: void PrintGameBoard(jogo_4line*jg) { int i,n; system("clear"); printf("===============Jogo do 4 em linha===============\n\n\n"); printf(" +--+--+--+--+--+--+--+\n"); for(i=1; i<=6; i++) { printf("%d |%c |%c |%c |%c |%c |%c |%c |\n",7-i,jg->T[i][1],jg->T[i][2],jg->T[i][3],jg->T[i][4],jg->T[i][5],jg->T[i][6],jg->T[i][7]); if (i!=0) printf(" +--+--+--+--+--+--+--+\n"); } printf(" …

Member Avatar for Adak
0
227
Member Avatar for bloominninja

So im having issues with a sorted list template, heres how I implemented it enum RelationType {LESS, EQUAL, GREATER}; template<class ItemType> struct NodeType { ItemType info; NodeType<ItemType>* next; }; template<class ItemType> class SortedType { public: SortedType(); ~SortedType(); bool IsFull() const; int GetLength() const; void MakeEmpty(); ItemType GetItem(ItemType item, bool& found); …

Member Avatar for bloominninja
0
335
Member Avatar for shawn.crego

I need help with my java code for the game hangman... we are using eclipse to write the game and using three main files to start...hangman.java hangmanlexicon.java and hangmancanvas.java. the first part of the assignment, is to create a ConsoleProgram for the game and this is what i have so …

Member Avatar for NormR1
0
244
Member Avatar for priya_pawar

Write a program (in a single .c file) with a queue of strings implemented using array. You should write ite a queue type. The program reads a set of strings stored in a file (filename given on command line as argument) and inserts each string in the queue. Then it …

Member Avatar for Ancient Dragon
-1
171
Member Avatar for Alexkid

Hi There, I need to re-write any mention of .tellg() in my code as the function is not supported on the desired hardware. I have the following lines of code: getline(file,line); { std::istringstream stream(line); stream >> first >> second >> third >> forth; UINT32 file_pos = stream.tellg(); file_pos++; fifth = …

Member Avatar for vijayan121
0
724
Member Avatar for wootburgers

I want to make a program that cross checks strings. Here is an example : **Enter line: AAGGAA This sequence can make a hairpin** **Enter line: UGAG This sequence cannot make a hairpin** **Enter line: GUGCCACGGCACCGUG This sequence can make a hairpin** **Enter line: GUACCACGGCACCGUG This sequence cannot make a …

Member Avatar for wootburgers
0
254
Member Avatar for androidz

HI i have this error null reference i don't know why Imports System.Data.SqlClient Imports System.Configuration Imports System.Configuration.ConfigurationSettings Public Class Form1 Private ConName As New DataAccess Private Sub cmdconnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdconnect.Click Dim conn As String Dim m_server As String Dim m_db As String m_server …

Member Avatar for androidz
0
278
Member Avatar for henry.sj.shin

Hello All, I'm trying to write a function that outputs the reverse of the input. I know that you can use the built-in list.reverse() or S[::-1] methods, but I want to make it using the 'for' loop. My code initially is: def reverse(S) for x in S: print(x, end = …

Member Avatar for TrustyTony
0
390
Member Avatar for ahmed.alsalihi.3

Hi, Im stuck, Im trying to make a program that asks the user for a decimal number and then it converts it to a binary number. Im assuming I need a "remainder = string % 2" or something along these lines but Im not really sure where to start. anyhelp …

Member Avatar for WaltP
0
252
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
999
Member Avatar for astian

Hi, again Im hoping to be on the right topic. So here it is: I am publishing a SilverlightApplication that uses a WCF service to read from a database. The application uses Bing Maps to visualize some polygons. The thing is, that after I publish it ONLY on some machines …

0
151
Member Avatar for pritaeas

The `ReplaceStrings` function replaces all strings in `APatterns` found in `ASubject` with the value in `AReplacement`. As an example, I added the `RemoveStrings` function which replaces everthing with an empty string, thus deleting all strings found. Usage examples are in the XMLDoc comments. A good test will be to rewrite …

Member Avatar for pritaeas
0
264

The End.