Is there anyone can provide me some hints about my question?
Type: Posts; User: Watervase Chew
Is there anyone can provide me some hints about my question?
Dear All,
After modifying my vertex coloring code several time, I come out with this code, but I am facing some problem with the color assignment function prototype.
This is the portion for the...
Hi Andreas, when I execute the program in Ubuntu terminal, it just stuck at this part and not running anymore even after waiting for 10 minutes :eek:
Dear all,
I am facing error with the function prototype code below, the terminal wasn't response at all after the program execute until the code below....
void assignColor ( int lines, int...
Now, I think I have reach this final part, but I got no idea how to ask the program to check every vertex's for duplicated colour. One of my friend told me that this is bi-directional vertex...
This is my previous attempt using the normal looping method to assign color. But, it wasn't fulfill the vertex coloring requirement: using minimum numbers of color in the color assignment.....
...
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define SIZE 255
int true = 1;
int false = 0;
int vertex[SIZE], degree[SIZE], color[SIZE], colorcounter[SIZE], degreecount[SIZE],...
I found another example at ›š„m€‰—˜ - qinyg - š客›..
//图着色问题回溯法
/*
无向图邻接矩阵示例 Sample matrices format of vertex and degree
1 1 0 0
1 1 0 1
1 0 0 1
Dear Salem, thank you so much for your guidelines and correction. Before this version of code, I was doing them in function prototype form, but due to pointer and others compilation warning, I was...
Dear Malcolm McLean, thanks for your detail explanation. I have the duplicated edge list in the graph file for each vertex. But, my problem now is I haven reach the struct of C programming. By...
This is the content of graph file
[Vertex] [Connected Vertex]
1 2
1 3
2 1
2 3
2 4
2 5
Dear all,
Please provide some help for the code below....
/* Vertex Coloring Algorithm
2013-05-05 10:10 Version 2.5
:rolleyes:Just manage to correct the error with help from someone... But still not very understand about the correct way of link the data in between array to pointer :confused:
Sorry for late reply.
manual11.c: In function main:
manual11.c:44:3: error: too few arguments to function reverseWords
manual11.c:10:6: note: declared here
manual11.c: At top level:...
After made the above changing, my code become:
// Read text from filenames entered by user OR text input from user and
// sort in alphabetical format.
#include <stdio.h>
#include...
#include <stdio.h>
#include <string.h>
#define SIZE 255
#define LEN 255
void reverseWords(char *s);
void reverse(char *begin, char *end);
void namesort ( char name[LEN][SIZE], int last );...
Found an useful function here to reverse my string...
Reverse words in a given string - GeeksforGeeks | GeeksforGeeks
:redface:
Hi there, at first I thought of using strtok to remove all the period symbol first and place every small part (i.e. abc) of the main string (abc.example.co.jp) into 2D array, then compare the final...
Dear all, I want to the split the name array (up to total n numbers of them, n = last) into smaller sub name and place them into 2D array.
The code below looks like cannot loop properly, is there...
This is my updated code for the sorting function:
Compiled with errors :(
// Function to Sorting by symbol, A-Z, a-z
void namesort ( char name[LEN][SIZE], int last ){
int i, j, x;...
The input strings consist of data separate with period only. Actually the input data are same like the web address (i.e. cboard.cprogramming.com). It looks like much more difficult to sort them,...
My next steps will be sorting the data from either inside a text file OR entered manually in the following format. Any idea about it?
line3text1.line3text2.line3text3...
:o
// Read text from filenames entered by user OR text input from user and
// sort in alphabetical format.
#include <stdio.h>
#include <string.h>
Dear Malcolm McLean and Jim, looks like I am confusing with the name[j] and name, I had missed the [j] in the strcpy, that's why showing warnings during compilation.
Thanks :redface:
Looks like I had made a mistake in the strcpy.
I had correct their position. But now the compiler showing these error:
manual5.c: In function main:
manual5.c:38:5: warning: passing argument 1...