174 Topics

Member Avatar for
Member Avatar for dshiells

Hi all, I'm sure this is a n00b question, but I can't seem to get my head around it! I have a 4 BYTE array which I want to display as a decimal value. For example, in the array it contains the hex values: 00 05 7d a4, and I …

Member Avatar for dshiells
0
2K
Member Avatar for hwoarang69

trying to copy pointer in array. lets say *pointer has the value "COMPUTER". and i want to store in array[o]; note: i want to use strcat to do this and i do not want to do some thing like "array[0]" char test[10]; char *point; //has the value "COMPUTER" for(int i …

Member Avatar for Vish0203
0
180
Member Avatar for James19142

i'm making this function that replaces single slashes in a path with doubles slashes. It works for everything but slashes because I gotta use doubleslashes to specify a single slash so how do I refer to double slashes. QString AddDoubleSlashtoPath(QString Path){ QStringList splitup=Path.split("//") ;/*supposed to be a single slash*/ QString …

Member Avatar for triumphost
0
1K
Member Avatar for BThomps

I am trying to change the data type of a primary key in table A from INT(11) to CHAR(11). However, this primary key is a foreign key in tables B and C. SQL is giving me an error whenever I try to change the value type of the primary key. …

Member Avatar for BThomps
0
155
Member Avatar for hwoarang69

i want to create array of pointer. "aa" "ab" "ac" i tried many thing but it still give me error. char *table[3] = "aa", "ab", "ac"; or char *table[3]; *table[0] = "aa"; *table[1] = "ab"; *table[2] = "ac";

Member Avatar for hwoarang69
0
166
Member Avatar for greatman05

Is there a way to create a dynamic array without necessarily knowing the size beforehand? I need to specifically use a dynamic array for a homework assignment, and I don't really want to ask the user how large the array should be (in this case, an array of chars i.e. …

Member Avatar for greatman05
0
134
Member Avatar for hey.howdy

[CODE] // absolute.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include<iostream> #include<string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int i=0, j=0,k=0,l=0; string yes1;bool outcome;int u=0,v=0,w=0; string arr[4 ][4]={{"Name","Plot #", "Cost", "Address"}, {"john", "1121", "Rs.1000", "62 johar TOWN LAHORE"}, {"jonty", "1123", "Rs.100000", "56 …

Member Avatar for thines01
0
317
Member Avatar for hey.howdy

// absolute.cpp : Defines the entry point for the console application. // [CODE] #include "stdafx.h" #include<iostream> #include<string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { int i=0, j=0,k=0,l=0; string yes1;bool outcome;int u=0,v=0,w=0; string arr[4 ][4]={{"Name","Plot #", "Cost", "Address"}, {"john", "1121", "Rs.1000", "62 johar TOWN LAHORE"}, {"jonty", "1123", "Rs.100000", "56 …

0
95
Member Avatar for uzii305

OK, i'm working on a hangman game in cmd prompt. I'm about halfway done, but i have hit a wall regarding the secret word, and the user guess. Now mind you, my professor has not taught the class any array manipulation methods or techniques for finding specific char in an …

Member Avatar for uzii305
0
374
Member Avatar for ShEeRMiLiTaNt

Hello everyone, Ok my problem is that I do not get how to convert an array of characters to a string arrays. Like I do not get how to assign a null character at the end of a set of characters... how do I incorporate punctuation, spaces etc in this …

Member Avatar for Lerner
0
895
Member Avatar for Programming++

So, I'm working on making a encrypted in C++, just a basic one. The encrypter needs to have a minimum character limit but it's not working. It's not coming up with any compiler errors, but instead just acting as if the if statement isn't there... [code] #define _WIN32_WINNT 0x0500 #include …

Member Avatar for mazzica1
0
207
Member Avatar for AdamLad3

Hi, I'm writing a program in C++ to ask the user for a list of ten names and cities of residence in the format <firstname> <Surname> <city>. The amount of spaces between each doesn't matter as I will be using isspace. then i have to sort the list by city …

Member Avatar for Damian Dalton
0
1K
Member Avatar for ThomsonGB

I am trying to parse main(argc, argv[]); and i need to look at individual characters with in the strings pointed to by *argv[]. I though of a string as an array of chars. This builds fine but causes an error in execution. So what is a simple and straight forward …

Member Avatar for ThomsonGB
0
1K
Member Avatar for pitamber

Hello, I was just wondering how i could write a TicTacToe program in java without arrays. I am new to programming and i don't know lot of stuffs, so any help would be appreciated Thanks

Member Avatar for pitamber
0
1K
Member Avatar for SgtMe

Hi all. I'm using DragonFireSDK to make an iPhone app, which means that I can't use any external libraries other than the SDK one. I am trying to get an integer variable for score to a function which will display text on the screen. However, that function takes a char* …

Member Avatar for Ancient Dragon
0
399
Member Avatar for DaveyMoyes

Hi all, I am looking to understand Html entities & html special chars in more details. I have a form and text area that users complete, the databse updates correctly and displays the information. The problem im facing is this: When the database displays the data, its display incorrectly. For …

Member Avatar for karthik_ppts
0
218
Member Avatar for jember

Please hep me with this problem: I am having a problem with string handling using c language. This is actually an assignment. Here's how the whole program must work: 1. User must input a [B]valid password[/B] 2. Once the user inputted a valid password, it will access to an employee's …

Member Avatar for jember
0
494
Member Avatar for alexbnc

I want to get the information downloaded from a file (a BMP image) into a char array. I have this function [CODE] #define _countof(x) (sizeof(x) / sizeof(x[0])) char* DownloadBytes(char* szUrl) { HINTERNET hOpen = NULL; HINTERNET hFile = NULL; char* data = (char*)""; DWORD dataSize = 0; DWORD dwBytesRead = …

Member Avatar for alexbnc
0
332
Member Avatar for nicole10hart

can anyone tell me why my code would output the string designated plus ten or more characters of non sense at the end of it? my code also has a header with #include statements and a main that calls the functions. #include "String.h" //Default constructor String::String() { Text = NULL; …

Member Avatar for zeroliken
0
199
Member Avatar for TMDG

I am wondering how to read a file in c... this requires some more background information before you give me something useless What I have so far: [CODE]#include <stdio.h> int main(void) { FILE *fpr,*fpw; char C; int I; fpr = fopen("cwM.dat","r"); fpw = fopen("echocwM.dat","w"); while (C != EOF) { fscanf(fpr,"%c",&C); …

Member Avatar for WaltP
0
263
Member Avatar for engineerchica

Hey everyone, I am working on a function that reads a text file (portion below) of data points arranged in two columns and stores the numbers only in an array of signal[2500][2]. The problem is, I need to do some search and replace on [I]some[/I] of the data points. Some …

Member Avatar for WaltP
0
220
Member Avatar for engineerchica

Hi all, My code for a function to count words is posted below, and the only error that appears when I build it in my compiler is that char present is uninitialized. My program will not run with this uninitialized value. I've been searching for info on how to initialize …

Member Avatar for engineerchica
0
457
Member Avatar for bleedi

Hiya, I wasn't really sure if this goes under Java or Game Development forums, so I decided to post it here. I'm making a simple "Scrabble" game, which checks letters placed on the table and tries to find if they form proper nouns. I have a list of words, and …

Member Avatar for bleedi
0
201
Member Avatar for thecoolman5

hi, I am making a calculator and i need a function that can detect a char in a string. In other words, i need it to detect a NON-number.[CODE]string n1 = "35+66/7"; int pos = -1; n1.find(char, pos+1); cout << char.n1_find << " was found at "<< pos << endl; …

Member Avatar for thecoolman5
0
619
Member Avatar for terence193

well i am trying to pass this parameter in a function -->[ICODE]char*[I]filename[/I][/ICODE] [CODE] [U][B]//i just wrote this as an example to explain clearer my question[/B][/U] #include<stdio.h> #include<stdlib.h> void try (char *[I]filename[/I]) //[B] the question is how can i use the pointer to refer to a file? [/B] { printf("try"); } …

Member Avatar for terence193
0
249
Member Avatar for dev90

i want to go back to main menu while hitting escape key in my programme. for that i have make a function. [CODE]void exit (char[]) { if(char==27} { exit(0); } } [/CODE] but i have many user inputs which are of type int,float,char..... so i have tried, [CODE]while(kbhit!=27) { //coding …

Member Avatar for adityatandon
0
2K
Member Avatar for ThomsonGB

//////////////////////////////////////////////////////////////////////////////////////// // In this little project I am trying to learn to get and manipulate data from // a file input using fstream strings I also wanted to use the formating available // with the printf and related string handling methods. I have a question in regards // to the …

Member Avatar for ThomsonGB
0
256
Member Avatar for PrimePackster

Hello Guys, Well i have a problem, I coded a program to print the ascii table, then give the user a option to either convert character into ascii or ASCII to character. Well the latter is not working, and the loop to print the ascii table is having the same …

Member Avatar for PrimePackster
0
239
Member Avatar for l1nuxuser

Hello everybody i'am building a software to make lab management. So I need to save the data base. and i using SQLite. but I have problem the SQLite pramter is a const char. and the data from the software are CString. and becouse I using Unicode I can't convert them …

Member Avatar for kndubey88
0
636
Member Avatar for matt1117

Ok so i have this work for my java class done so far. And i cannot figure out how to get the different letters from an inputted word to output as a number. The assignment is get a user to input a 7 letter word and output it as a …

Member Avatar for StephNicolaou
0
3K

The End.