15,539 Topics
|
|
Hello I would like to count how many words are in a string ie "PETER JOHNSON LTD" so this string contains 3 I was going to use strtok but this is too slow. Any other ideas? |
|
Good day to you guys! im having a bit of a problem using strtok. im currently tinkering with extracting gps data, which are separated by commas. ive seen code in several forums but most of them assign the output of strtok to the same char pointer. what i want to … |
|
Hey guys. So I basically read in a bunch of data from a file into a data structure. But while I was doing that I included the spaces (which I dont want). So now I want to compare each element to see if it does have a blank space, and … |
|
I wonder why the following code work. In the debugger i see that every thing works fine but after the "root = createNode(item);" statement I can't see the new node assigned to root? [CODE]Node *insert( Node *root, int item ) { if(root==NULL) root = createNode(item); if(root->data>item) insert(root->left,item); else if(root->data<item) insert(root->right,item); … |
|
i have this assignment due tommorow ive tryed it but it seems tuffer than what it should. anyone have any ideas? Write a function stage 1() that reads one of Tommy’s data files into a suitably declared and named data structure. You should assume that there will be at most … |
|
need help- create a tree(simple m-ary),with each node having 4 dataitems & 5 children. "IN C-language" just 1 example showing 1 or 2 node created will be really helpfull(as this is tedious)........i have all operation clear till binary tree...but this 1 is not clicking!!!!..... or in case u knw any … |
|
I posted this thread but it got transferred to another, can someone edit the code for me so that I can get the answer in exponentiation, (^)and(*), Example : Enter number : 8 Prime factors of '8' : 2^3 Enter number : 56 Prime factors of '56' : 2^3*7 [B][U] … |
|
My program is a very simple address book program. The program works but i don't know how to make it display the same names. Like for example, the name "Mark Lee", if there are more than one Mark Lee, i would like to display all of those Mark Lee w/ … |
|
In answer to a coworker's question today about memory management today, I wrote the following code. It's an implementation of the gets function that accepts an infinite length string (bounded only by the heap) and [i]does not[/i] force the caller to free the resulting pointer. I figure that it's a … |
|
i have a problem when i use: [code] do { printf("press only A to continue):\n"); x=getchar(); }while(x!='A'); [/code] if i press anything the program prints me the message multiple times |
|
Hi all, I am using the following function which I found online to trim the leading and trailing whitespaces from a passed in string. It works fine for all the cases but I am having trouble in understanding the process being a newbie to C world. [CODE]char *trim (char *str) … |
|
hello frns.. :icon_smile: i am in need of a code that does the following very very urgently.. please please help me !!! [CODE]read strings from a text file "text1.txt" (which are stored 1 per line without spaces) and store these strings in a string array A[]. then read strings from … |
|
How can i make sscanf() skip all whitespace characters?I read from a file and i dont know where are the characters. eg.->@Solomon Islands ,i need "Solomon Islands" in one string e.g->AGAF (AFT) – Afutara Airport – Afutara ,i need "Afutara Airport" in one string. |
|
I want to know how to read from a file. I have posted the first line of program.dat file before. There are more than one line in the file and i want to tokenize them and save them into different variables or pointers. Can anyone write full code how to … |
|
can anyone help me for a simple polynomial addition using list.. no matter how long it is .. but it must be simple ... |
|
I would like to read a text file and store to strings some data that are important for me.I tried to do with strtok but wasnt successful?Can u help pls? [QUOTE]txtExample @Greece ASAS (FFF) - BLALAL BALLA BLALALAL - JAJAJAJAJ, XAKALXKAL ZMAH (AVK) – Arvaikheer Airport – Arvaikheer, Ovorkhangai ZMBH … |
|
Is there a systematic method to analyze the time complexity of a program strictly from output data such as run-time, the number of data swaps, data comparisons, etc? For example... [icode] Data Size | Run Time | Comparisons | Moves --------------------------------------------- 1000 | 0.00 | 15448 | 23965 10000 | … |
|
hi i am doing code on single linked list in that i hav to save elements of my list to a file and then load it. The file is not loading pls check this code [CODE]#include<stdio.h> #include<stdlib.h> struct llist { int info; struct llist *next; }; typedef struct llist linked_list; … |
|
Hi, I am new to this website (and C++) so pls forgive any newb errors / convention mistakes. I have a project that contains both a normal source file (PB.cpp), associated header (PB.h) and a windows form (GUI.h). I'm trying to pass a variable from the form to a function … |
|
[code] #include<stdio.h> #include<stdlib.h> #include<string.h> struct name { int a; char b[10]; char c; }; int main() { struct name *p; char *n; n = (char *)malloc(3 * sizeof(char)); // in this why 3 means.. its my condition n = (char *)p; n->a = 3; // this line is showing error … |
|
Hey guys, recently i've tried to compile this command line email program I get the error: cannot find -lobjc ld returned 1 exit status Here's my code. Any Help Appreciated. [CODE] #include <stdio.h> #include <stdlib.h> #include <string.h> #include <winsock.h> #define NETWORK_ERROR -1 #define NETWORK_OK 0 FILE *fp; char buffer[200000]; char … |
|
c program to implement a stack using two queue |
|
i have *.exe file which is written in C.....when i run this exe file, console window opens even though i have not given any thing to print on console...the .exe file performs file reading and writing operations....now how to i close the console window automatically....i dont want to hide....i am … |
|
I dont want to use strtok. I want to know how to use strsep? Any Idea. For example i have a string with delim progID|progTitle|progDescription|progCode. Help please |
|
I need to take 2 char strings (6 character date) (and (8 charachter operatror id) convert to uin32 to send over a bus to store by another processor. That processor later sends them back as uint32 and I need to conver back to char strings. Two files need access to … |
|
Hi All, I am using microsoft nmake tool version 6.00 for my project. when I make changes in any of the .h files, the C files which includes the header file is not getting compiled automatically. Can anyone give some suggestions please? Thanks in advance!! -Karuppiah |
|
struct start { int* i; int* j; }p; p.i = new getValue(); when i am printing the value of i it is giving address not the value. Please tell how to get the value. |
|
Hi, I need to find p,q and e values for RSA. Here is a simple & short description of RSA. [QUOTE]Your enter a word (actually it is a sentence but for now a word) then program will convert letters to numbers (like a=1 m=13 etc.) and group them. Use with … |
|
Hi... How can i call a c function for e.g say rounding decimals in Netezza.As it is possible in Netezza with a external C routine but don't the way to proceed.Can anyone please help me out.....?? |
|
Hi, I'm not sure if this is the right forum to post this thread in, but here it is. Even though I program on the Mac OS X platform, and am quite good at it, I'm really doing game programming, so I never really learned much Cocoa or Carbon. Can … |
The End.